[erlang-bugs] Math library defect?

Florian Weimer fw@REDACTED
Mon May 19 07:19:38 CEST 2008

* Matthew Dempsky:

> (This is dated two days ago, but it just showed up in my inbox.)
> On Thu, May 15, 2008 at 8:50 AM, Tony Finch <dot@REDACTED> wrote:
>> On Thu, 15 May 2008, John Haugeland wrote:
>>> I believe I have found a defect in the math library.
>> You have just discovered that floating point numbers have limited precision.
> That's irrelevant here.  2^{56} and 2^{57} can be represented exactly
> using IEEE-754 double precision floating point numbers.

144115188075855870.0 and 144115188075855872.0 are the same number as far
as doubles are concerned.  So if there's a bug, it's in the conversion
to decimal, not in pow.

More information about the erlang-bugs mailing list