about summary refs log tree commit diff
path: root/include/math.h
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2012-03-30 23:41:43 -0400
committerRich Felker <dalias@aerifal.cx>2012-03-30 23:41:43 -0400
commit4dbd94112ff74064554054b5ff27a7af547e4899 (patch)
tree645719500ef91a28a6dc3d6350f82f538e4887a0 /include/math.h
parent93a18a15e4428d4fe3f239081e0218ac0c69f458 (diff)
downloadmusl-4dbd94112ff74064554054b5ff27a7af547e4899.tar.gz
musl-4dbd94112ff74064554054b5ff27a7af547e4899.tar.xz
musl-4dbd94112ff74064554054b5ff27a7af547e4899.zip
optimize signbit macro
Diffstat (limited to 'include/math.h')
-rw-r--r--include/math.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/math.h b/include/math.h
index 8791bba8..ff62cb7c 100644
--- a/include/math.h
+++ b/include/math.h
@@ -77,8 +77,8 @@ int __signbitf(float);
 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) ? (int)(__FLOAT_BITS(x)>>31) : \
+	sizeof(x) == sizeof(double) ? (int)(__DOUBLE_BITS(x)>>63) : \
 	__signbitl(x) )
 
 #define isunordered(x,y) (isnan((x)) ? ((void)(y),1) : isnan((y)))