Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: list a variable - correction


From   Gary Longton <[email protected]>
To   [email protected]
Subject   Re: st: list a variable - correction
Date   Thu, 17 Apr 2003 07:33:56 -0700

[email protected] wrote:
> 
> > I have look at the manual for a long time,and try different variable format,
> > but, it seems not work.
> >
> > Suppose I have a variable with the following numbers:
> >
> > obs1 123456789123456789
> > ......
> >
> > That means, the entry of this variable is a huge number.
> > However, when I ask Stata to list this variable.
> > Stata always return:
> >
> > obs1 1.234..e17 instead of its original format.

and I wrote:

> Take a look at the help concerning
> 
> 1) display formats (whelp format)
> 
> and
> 
> 2) numeric storage types and precision (whelp datatype)
> 
> Even if your variable was type double (2 byte storage), you would not
                                         ^ 
> get the 18 digits of precision you desire.  You will need to store such
> a number as a string variable to retain all 18 digits.

I hastily wrote "2 byte storage", which should have been "8 byte" for
doubles (floats are 4 bytes).

- Gary
*
*   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