[Issue 14732] New: [REG 2.068 beta] Failing unittest in std.math

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Thu Jun 25 02:14:07 PDT 2015


https://issues.dlang.org/show_bug.cgi?id=14732

          Issue ID: 14732
           Summary: [REG 2.068 beta] Failing unittest in std.math
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: regression
          Priority: P1
         Component: phobos
          Assignee: nobody at puremagic.com
          Reporter: ibuclaw at gdcproject.org

https://github.com/D-Programming-Language/phobos/pull/3285

I tested this using -mlong-double-64 on GDC.

Test:
---
real x = exp(-0x1.64p+9L);


The assert checks that the returned result is 0x0.06f84920bb2d3p-1022L

However, the actual value returned is 0x0.06f84920bb2d4p-1022L, where it
appears that the last digit is rounded up.

To be sure, I even tested this using libm, and found that it also agreed with
me, the value the unittest expects is wrong by 1 digit.


Now, maybe testing using -mlong-double-64 on a x86_64 machine is contrived, but
given that I found a discrepancy for this test (and this test only) strikes me
as not very assuring, and other targets may fail in the same way.

--


More information about the Digitalmars-d-bugs mailing list