[Bug 251091] lib msun remainder() gives incorrect result on powerpc64

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Fri Nov 13 02:05:09 UTC 2020


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=251091

            Bug ID: 251091
           Summary: lib msun remainder() gives incorrect result on
                    powerpc64
           Product: Base System
           Version: CURRENT
          Hardware: powerpc
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: misc
          Assignee: bugs at FreeBSD.org
          Reporter: alfredo at freebsd.org

lib msun remainder() function gives incorrect result on powerpc64, as reported
by rem_test.c.
Expected result is 4.9406564584124654e-324, but -4.9406564584124654e-324 is
given.

Reduced test case:

#include <openlibm.h>
#include <assert.h>


int main() 
{
        double x=-3.3770170061145426e-226;
        double y=2.4703282292062327e-323;
        double expected_rem = 4.9406564584124654e-324;

        double rem;

        rem = remainder(x, y);

        assert(rem == expected_rem);

        return(0);
}

* compile with "cc rem.c  -lm"

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-bugs mailing list