projects
/
libm
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
5298ab4
)
add !! to signbit macro so the return type is not uint64_t
author
nsz
<nsz@port70.net>
Tue, 6 Mar 2012 18:17:42 +0000
(19:17 +0100)
committer
nsz
<nsz@port70.net>
Tue, 6 Mar 2012 18:17:42 +0000
(19:17 +0100)
include/math.h
patch
|
blob
|
history
diff --git
a/include/math.h
b/include/math.h
index
19097a5
..
f320b8e
100644
(file)
--- a/
include/math.h
+++ b/
include/math.h
@@
-74,8
+74,8
@@
int __signbitf(float);
int __signbitl(long double);
#define signbit(x) ( \
int __signbitl(long double);
#define signbit(x) ( \
- sizeof(x) == sizeof(float) ?
__FLOAT_BITS(x) & 0x80000000
: \
- sizeof(x) == sizeof(double) ?
__DOUBLE_BITS(x) & (__uint64_t)1<<63
: \
+ sizeof(x) == sizeof(float) ?
!!(__FLOAT_BITS(x) & 0x80000000)
: \
+ sizeof(x) == sizeof(double) ?
!!(__DOUBLE_BITS(x) & (__uint64_t)1<<63)
: \
__signbitl(x) )
#define isunordered(x,y) (isnan((x)) ? ((void)(y),1) : isnan((y)))
__signbitl(x) )
#define isunordered(x,y) (isnan((x)) ? ((void)(y),1) : isnan((y)))