author | Szabolcs Nagy <nsz@port70.net> | 2013年09月02日 00:38:51 +0000 |
---|---|---|
committer | Szabolcs Nagy <nsz@port70.net> | 2013年09月05日 11:30:07 +0000 |
commit | af5f6d9556441487e5c66a7a4cfeddf4ed354aa7 (patch) | |
tree | 34a31a68753c2851628109713a3462cb4742ef44 /src/math/copysignl.c | |
parent | ff4d6020d1c8aaab4f05e561789d6dad3d7ef083 (diff) | |
download | musl-af5f6d9556441487e5c66a7a4cfeddf4ed354aa7.tar.gz |
-rw-r--r-- | src/math/copysignl.c | 6 |
diff --git a/src/math/copysignl.c b/src/math/copysignl.c index 72a21488..9dd933cf 100644 --- a/src/math/copysignl.c +++ b/src/math/copysignl.c @@ -9,8 +9,8 @@ long double copysignl(long double x, long double y) long double copysignl(long double x, long double y) { union ldshape ux = {x}, uy = {y}; - - ux.bits.sign = uy.bits.sign; - return ux.value; + ux.i.se &= 0x7fff; + ux.i.se |= uy.i.se & 0x8000; + return ux.f; } #endif |