projects
/
libm
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
use different const in __expo2
[libm]
/
src
/
math
/
ilogbl.c
diff --git
a/src/math/ilogbl.c
b/src/math/ilogbl.c
index
03c8f21
..
ed9ddcb
100644
(file)
--- a/
src/math/ilogbl.c
+++ b/
src/math/ilogbl.c
@@
-1,11
+1,12
@@
#include <limits.h>
#include "libm.h"
#include <limits.h>
#include "libm.h"
-#if LD64
+
+#if LDBL_MANT_DIG == 53 && LDBL_MAX_EXP == 1024
int ilogbl(long double x)
{
return ilogb(x);
}
int ilogbl(long double x)
{
return ilogb(x);
}
-#elif LD
80
+#elif LD
BL_MANT_DIG == 64 && LDBL_MAX_EXP == 16384
int ilogbl(long double x)
{
union ldshape u = {x};
int ilogbl(long double x)
{
union ldshape u = {x};
@@
-21,7
+22,7
@@
int ilogbl(long double x)
}
if (e == 0x7fff)
/* in ld80 msb is set in inf */
}
if (e == 0x7fff)
/* in ld80 msb is set in inf */
- return m &
~((uint64_t)1<<63)
? FP_ILOGBNAN : INT_MAX;
+ return m &
(uint64_t)-1>>1
? FP_ILOGBNAN : INT_MAX;
return e - 0x3fff;
}
#endif
return e - 0x3fff;
}
#endif