MOO-cows Mailing List Archive
[Prev][Next][Index][Thread]
Re: Floating point error
-
Date: Wed, 13 Mar 1996 19:03:24 PST
-
From: hpa@zytor.com (H. Peter Anvin)
-
Reply-To: hpa@zytor.com (H. Peter Anvin)
-
Content-Type: text
Followup to: <96Mar13.131044pdt.7592@silk.parc.xerox.com>
By author: Pavel Curtis <pavel@parc.xerox.com>
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...)
-hpa
--
PGP public key available - finger hpa@zytor.com
"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