summaryrefslogtreecommitdiff
path: root/src/math/copysignl.c
diff options
context:
space:
mode:
authorSzabolcs Nagy <nsz@port70.net>2013-09-02 00:38:51 +0000
committerSzabolcs Nagy <nsz@port70.net>2013-09-05 11:30:07 +0000
commitaf5f6d9556441487e5c66a7a4cfeddf4ed354aa7 (patch)
tree34a31a68753c2851628109713a3462cb4742ef44 /src/math/copysignl.c
parentff4d6020d1c8aaab4f05e561789d6dad3d7ef083 (diff)
downloadmusl-af5f6d9556441487e5c66a7a4cfeddf4ed354aa7.tar.gz
long double cleanup, initial commit
new ldshape union, ld128 support is kept, code that used the old ldshape union was rewritten (IEEEl2bits union of freebsd libm is not touched yet) ld80 __fpclassifyl no longer tries to handle invalid representation
Diffstat (limited to 'src/math/copysignl.c')
-rw-r--r--src/math/copysignl.c6
1 files changed, 3 insertions, 3 deletions
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