[Issue 5229] Inaccurate parsing of floating-point literals

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Nov 17 04:24:58 PST 2010


http://d.puremagic.com/issues/show_bug.cgi?id=5229


Don <clugdbug at yahoo.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |clugdbug at yahoo.com.au


--- Comment #1 from Don <clugdbug at yahoo.com.au> 2010-11-17 04:23:43 PST ---
Actually 19 digits works. The thing that's wrong is that the compiler uses
_all_ provided digits. Instead, according IEEE754, it should only take the
first 19 digits, performing decimal rounding of the l9th digit if more digits
are provided.

It's a problem in DMC's standard library implementation of strtold().

I once found a case where adding more decimal digits made the number smaller(!)

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list