projects
/
libm
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
476985a
)
fix bit masking hack in fpclassifyl and copysignl
author
nsz
<nsz@port70.net>
Sun, 4 Mar 2012 01:39:41 +0000
(
02:39
+0100)
committer
nsz
<nsz@port70.net>
Sun, 4 Mar 2012 01:39:41 +0000
(
02:39
+0100)
src/math/__fpclassifyl.c
patch
|
blob
|
history
src/math/copysign.c
patch
|
blob
|
history
diff --git
a/src/math/__fpclassifyl.c
b/src/math/__fpclassifyl.c
index
daeeaab
..
308dc21
100644
(file)
--- a/
src/math/__fpclassifyl.c
+++ b/
src/math/__fpclassifyl.c
@@
-10,7
+10,7
@@
int __fpclassifyl(long double x)
if (!e)
return u.bits.m ? FP_SUBNORMAL : FP_ZERO;
if (e == 0x7fff)
- return u.bits.m & ~(
uint64_t)1<<63
? FP_NAN : FP_INFINITE;
+ return u.bits.m & ~(
(uint64_t)1<<63)
? FP_NAN : FP_INFINITE;
return u.bits.m & (uint64_t)1<<63 ? FP_NORMAL : FP_NAN;
}
#elif LD128
diff --git
a/src/math/copysign.c
b/src/math/copysign.c
index
814d80c
..
04e1869
100644
(file)
--- a/
src/math/copysign.c
+++ b/
src/math/copysign.c
@@
-5,7
+5,7
@@
double copysign(double x, double y) {
ux.value = x;
uy.value = y;
- ux.bits &= ~(
uint64_t)1<<63
;
+ ux.bits &= ~(
(uint64_t)1<<63)
;
ux.bits |= uy.bits & (uint64_t)1<<63;
return ux.value;
}