www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 21698] New: Windows VisualD x86-mscoff fails to compare


          Issue ID: 21698
           Summary: Windows VisualD x86-mscoff fails to compare
           Product: D
           Version: D2
          Hardware: Other
                OS: Windows
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: bugzilla bernis-buecher.de

The following unittest fails on dlang.phobos (Windows_VisualD x86-mscoff) from
the Phobos testsuite:

    import std.math : pow;

    double d1 = 21800.0;
    assert(pow(d1,72) == double.infinity); // fails

    // additional infos:

    import std.stdio;
    writeln(pow(d1,72)); // inf
    writeln(typeof(pow(d1,72)).stringof); // double

    union A
        double a;
        ulong b;

    A a;
    a.a = pow(d1,72);
    writefln!"%.064b"(a.b); //

The output at the bottom shows, that value, type and even bitpattern are
correct. Anyway, the comparison fails. (It works on all other computers from
the test suite.)

Mar 10