math: fix fmodl for IEEE binary128
authorSzabolcs Nagy <nsz@port70.net>
Mon, 9 Feb 2015 00:16:35 +0000 (01:16 +0100)
committerSzabolcs Nagy <nsz@port70.net>
Mon, 9 Feb 2015 00:16:35 +0000 (01:16 +0100)
This trivial copy-paste bug went unnoticed due to lack of testing.
No currently supported target archs are affected.

src/math/fmodl.c

index 54af6a3fd1592b4efb592fd21093e8f469a416c1..9f5b87393dcad9ffcd44876d7b76120563a3e85f 100644 (file)
@@ -63,7 +63,7 @@ long double fmodl(long double x, long double y)
        xhi = (ux.i2.hi & -1ULL>>16) | 1ULL<<48;
        yhi = (uy.i2.hi & -1ULL>>16) | 1ULL<<48;
        xlo = ux.i2.lo;
-       ylo = ux.i2.lo;
+       ylo = uy.i2.lo;
        for (; ex > ey; ex--) {
                hi = xhi - yhi;
                lo = xlo - ylo;