X-Git-Url: http://nsz.repo.hu/git/?p=libm;a=blobdiff_plain;f=src%2Fmath%2Filogbl.c;h=099c81a4ebf4c11e07e8804e0f28efd8c80119ed;hp=acaf31212a33ea394d4e1d985ebaa81db848e4c4;hb=59c2bd747bce9b1e35c893b2ace9bea57523a901;hpb=fc04675a09587031d5daebcb877b73976890b71d diff --git a/src/math/ilogbl.c b/src/math/ilogbl.c index acaf312..099c81a 100644 --- a/src/math/ilogbl.c +++ b/src/math/ilogbl.c @@ -1,11 +1,11 @@ #include #include "libm.h" -#if LD64 +#if LDBL_MANT_DIG == 53 && LDBL_MAX_EXP == 1024 int ilogbl(long double x) { return ilogb(x); } -#elif LD80 +#elif LDBL_MANT_DIG == 64 && LDBL_MAX_EXP == 16384 int ilogbl(long double x) { union ldshape u = {x}; @@ -21,7 +21,7 @@ int ilogbl(long double x) } 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<<63) ? FP_ILOGBNAN : INT_MAX; return e - 0x3fff; } #endif