Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: RE: st: A bug in egen and gen?


From   Maarten buis <[email protected]>
To   [email protected]
Subject   RE: RE: st: A bug in egen and gen?
Date   Fri, 18 Feb 2011 16:59:22 +0000 (GMT)

--- On Fri, 18/2/11, Liao, Junlin wrote:
> Out of curiosity, do you know the maximum difference that
> the -recast- procedure allows to recast a variable from
> double to float?

The answer would have to be in terms of relative differences
not absolute differnces. I am still not as good at thinking 
in binary as Bill, so I use the rule of thumb that in float 
the first seven (decimal) digits are accurate, while for 
double it will be the first 16 digits. If you have very large
numbers to begin with, the absolute difference could be in the
10s, 100s, 1000s or even 10000s (compare Bill's example of
storing the US deficit as either a float or a double or:
<http://blog.stata.com/2011/02/10/how-to-read-the-percent-21x-format-part-2/>)

-- Maarten

--------------------------
Maarten L. Buis
Institut fuer Soziologie
Universitaet Tuebingen
Wilhelmstrasse 36
72074 Tuebingen
Germany

http://www.maartenbuis.nl
--------------------------


      

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index