MOO-cows Mailing List Archive


Re: Floating point error

Brian Buchanan writes:
> It appears that there's a problem with floating point in 1.8.0p1...
> On a MOO running 1.8.0beta3 and on another running beta2:
> ;1.6
> => 1.6
> On a MOO running 1.8.0p1 and on ANOTHER running p1:
> ;1.6
> => 1.6000000000000001

This is, indeed, an issue in the release and not just in any particular
operating system.  The change (in 1.8.0) was to add a couple more digits to the
output of floating-point numbers (DBL_DIG + 2 instead of just DBL_DIG, for
those who know what that means).  I was trying to be sure of getting all of the
information in the number, especially for DB saving, but I may have gone too
far.  I'll look into it for 1.8.0p2.



Home | Subject Index | Thread Index