Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: RE: ml and variable types: Scalar vs. Local precision?


From   "Austin Nichols" <[email protected]>
To   [email protected]
Subject   Re: st: RE: ml and variable types: Scalar vs. Local precision?
Date   Thu, 21 Dec 2006 08:12:42 -0500

Nick--
I know this was once true, and used to be the source of much
frustration in -while- loops, but is it still the case?

local pi=_pi
scalar pi=_pi
di %32.20f `pi'
di %32.20f pi
di %32.20f float(pi)

suggests not.

On 12/20/06, Nick Cox <[email protected]> wrote:
The answer is Yes, and this is prominently documented.

Although it is unlikely to be the source of the problem,
it will do no harm to cast anything you care about as
a scalar not a local.

Nick
[email protected]

Rachel

> Another issue is that some constants inside the
> evaluator are defined as scalars and others as locals.  Do locals
> (when evaluated with single quotes) have a lower precision than
> scalars?
*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index