[Issue 21601] New: std.math : pow(float/double, -2) produces sometimes wrong result

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Feb 1 18:46:24 UTC 2021


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

          Issue ID: 21601
           Summary: std.math : pow(float/double, -2) produces sometimes
                    wrong result
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P1
         Component: phobos
          Assignee: nobody at puremagic.com
          Reporter: bugzilla at bernis-buecher.de

Both unittests fail:

import std.math : pow;

unittest
{
    assert(pow(-513645318757045764096.0f,-2) > 0.0);
    assert(pow(-1.6299717435255677e+154,-2) < 0.0);
}

--


More information about the Digitalmars-d-bugs mailing list