MOO-cows Mailing List Archive


Re: Floating point error

Followup to:  <>
By author:    Pavel Curtis <>
In newsgroup: local.moo
> 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.

Pavel, use DBL_DIG for tostr() and toliteral(); use DBL_DIG+4 for
saving the database.  Using additional digits for db-saving makes
sense, but not for presentation (becaused I spaced out when I wrote
the original fpmoo patch, I didn't use DBL_DIG but hardcoded %15g and
%22g instead...)


PGP public key available - finger
"The earth is but one country, and mankind its citizens."  --  Bahá'u'lláh
GE/CS 3.1 d- s-:- a- C++++ ULIS++++$ P+++ L++++>+++++ E++ W++ N++ o+ K
w--- O@ M V- PGP+ t+ 5++ X? R@ tv- b++ DI++++ D++(+) G e++ h- r-- y-

Home | Subject Index | Thread Index