X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=src%2Fmath%2Fatanf.c;h=178341b670fa249fa50157d878ac2a66bd7f1843;hb=7590203c486d9002522019045d34ee3dee0a66f5;hp=4b59509ad4a47aafc60127129c8edf1380d641ff;hpb=969ddbc423238291d5c7982790bbe72720627ba4;p=musl diff --git a/src/math/atanf.c b/src/math/atanf.c index 4b59509a..178341b6 100644 --- a/src/math/atanf.c +++ b/src/math/atanf.c @@ -40,7 +40,7 @@ static const float aT[] = { float atanf(float x) { - float w,s1,s2,z; + float_t w,s1,s2,z; uint32_t ix,sign; int id; @@ -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;