summaryrefslogtreecommitdiff
path: root/src/math/atanl.c
diff options
context:
space:
mode:
authorSzabolcs Nagy <nsz@port70.net>2012-12-16 20:28:43 +0100
committerSzabolcs Nagy <nsz@port70.net>2012-12-16 20:28:43 +0100
commitc6383b7b10303457306932584fc23f24b5153a81 (patch)
treeebc0a95cb34bcb501060b1679f14a19c7d92c91c /src/math/atanl.c
parentd8a7619e371ff0f226200f6316abb46dd1192f3d (diff)
downloadmusl-c6383b7b10303457306932584fc23f24b5153a81.tar.gz
math: use 0x1p-120f and 0x1p120f for tiny and huge values
previously 0x1p-1000 and 0x1p1000 was used for raising inexact exception like x+tiny (when x is big) or x+huge (when x is small) the rational is that these float consts are large enough (0x1p-120 + 1 raises inexact even on ld128 which has 113 mant bits) and float consts maybe smaller or easier to load on some platforms (on i386 this reduced the object file size by 4bytes in some cases)
Diffstat (limited to 'src/math/atanl.c')
-rw-r--r--src/math/atanl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/math/atanl.c b/src/math/atanl.c
index 6a480a7a..e76693e4 100644
--- a/src/math/atanl.c
+++ b/src/math/atanl.c
@@ -80,7 +80,7 @@ long double atanl(long double x)
if (expt == 0x7fff &&
((u.bits.manh&~LDBL_NBIT)|u.bits.manl)!=0) /* NaN */
return x+x;
- z = atanhi[3] + 0x1p-1000;
+ z = atanhi[3] + 0x1p-120f;
return expsign < 0 ? -z : z;
}
/* Extract the exponent and the first few bits of the mantissa. */
@@ -89,7 +89,7 @@ long double atanl(long double x)
if (expman < ((0x3fff - 2) << 8) + 0xc0) { /* |x| < 0.4375 */
if (expt < 0x3fff - 32) { /* if |x| is small, atanl(x)~=x */
/* raise inexact if x!=0 */
- FORCE_EVAL(x + 0x1p1000);
+ FORCE_EVAL(x + 0x1p120f);
return x;
}
id = -1;