[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
st: Default precision - was Why does Stata do it wrong?
On Mon, 9 Jun 2003, Michael Blasnik wrote:
> This is a common listserv item -- the problem is one of precision.
> ... perhaps
> StataCorp should consider shipping Stata with double as the default variable
> type instead of float.
That is a good suggestion, but only moves the problem to a larger value.
The reason for Stata's defaults is that the program was developed to run
on the original PC under DOS when memory was a limiting resource. The
Stata 3 Manual explicitly advised using the most compact storage structure
for each variate to maximize use of memory and processing speed.
Microsoft have never had any interest, knowledge or ability in memory
management. This attitude started with the big lie that DOS could not
be enhanced because it has a 64K memory limit. MS expect users to buy a
new computer with larger memory for every release of Windows. Given that
most of us now have hundreds of megabytes of real memory on our desks and
processors that work for infinitesimal fractions of the day, the attempt
by Stata to be economical becomes, as noted, an inefficiency for the user.
So, StataCorp, could the change to the default be made as a simple update
in the current version of the exe? Would it have implications other than
the program not being BUG-compatible with the current version?
The intellectual argument against is that it does simply move the problem,
and perhaps users need to be more aware that any computer is a finite
machine. Stata's sum in Tesfayi Gebre's original problem was correct
within the accuracy of the machine, and the suggested solution is
documented under "help datatypes": "If you are storing identification
numbers, however, the rounding could matter. If the identification
numbers are integers and take 9 digits or less, store them as longs;
otherwise, store them as doubles. doubles have 16 digits of accuracy."
R. Allan Reese Email: firstname.lastname@example.org
* For searches and help try: