musl - musl - an implementation of the standard library for Linux-based systems

index : musl
musl - an implementation of the standard library for Linux-based systems
summary refs log tree commit diff
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.c 6
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
generated by cgit v1.2.1 (git 2.18.0) at 2025年10月07日 09:28:44 +0000

AltStyle によって変換されたページ (->オリジナル) /