summaryrefslogtreecommitdiff
path: root/src/math/copysignl.c
diff options
context:
space:
mode:
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