author | Szabolcs Nagy <nsz@port70.net> | 2013年08月15日 10:14:46 +0000 |
---|---|---|
committer | Szabolcs Nagy <nsz@port70.net> | 2013年08月15日 10:14:46 +0000 |
commit | c599f4f4d705ba215a2672b92baa1c29d9dd0735 (patch) | |
tree | f9931ee00f59bae9aba69b9dbcff18a5c1613018 /src/math/atanf.c | |
parent | cd18dc8525a275323819ac4c7826cc3404202f7b (diff) | |
download | musl-c599f4f4d705ba215a2672b92baa1c29d9dd0735.tar.gz |
-rw-r--r-- | src/math/atanf.c | 5 |
diff --git a/src/math/atanf.c b/src/math/atanf.c index ac8bfd06..178341b6 100644 --- a/src/math/atanf.c +++ b/src/math/atanf.c @@ -55,8 +55,9 @@ float atanf(float x) } if (ix < 0x3ee00000) { /* |x| < 0.4375 */ if (ix < 0x39800000) { /* |x| < 2**-12 */ - /* raise inexact if x!=0 */ - FORCE_EVAL(x + 0x1p120f); + if (ix < 0x00800000) + /* raise underflow for subnormal x */ + FORCE_EVAL(x*x); return x; } id = -1; |