[Issue 5628] std.math unittest disabled - roundoff error in pow() on SSE2

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Sun Jul 2 11:12:31 PDT 2017


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

--- Comment #6 from Vladimir Panteleev <dlang-bugzilla at thecybershadow.net> ---
Here is the extracted test case from std.math:

void main()
{
    import std.math;

    immutable real x = 46;
    immutable float xf = x;
    immutable double xd = x;

    immutable short neg2 = -2;
    immutable long neg8 = -8;

    assert(pow(xd, neg2) == 1 / (x * x));
    assert(pow(xf, neg8) == 1 / ((x * x) * (x * x) * (x * x) * (x * x)));
}

--


More information about the Digitalmars-d-bugs mailing list