X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=src%2Fmath%2Fasinl.c;h=7572767c782e8039042472a544376468b05ae1eb;hb=3d3903fa5bd18f66c4f22fb766615d84b9519aa0;hp=370997bc6dc5b93db22702dd90cbfcabc938f942;hpb=b69f695acedd4ce2798ef9ea28d834ceccc789bd;p=musl diff --git a/src/math/asinl.c b/src/math/asinl.c index 370997bc..7572767c 100644 --- a/src/math/asinl.c +++ b/src/math/asinl.c @@ -23,9 +23,11 @@ long double asinl(long double x) } #elif (LDBL_MANT_DIG == 64 || LDBL_MANT_DIG == 113) && LDBL_MAX_EXP == 16384 #include "__invtrigl.h" -static const long double -one = 1.00000000000000000000e+00, -huge = 1.000e+300; +static const long double huge = 1.000e+300; +static const long double pio4_hi = 7.85398163397448309628e-01L; +#define ASIN_LINEAR (BIAS - 32) /* 2**-32 */ +/* 0.95 */ +#define THRESH ((0xe666666666666666ULL>>(64-(MANH_SIZE-1)))|LDBL_NBIT) long double asinl(long double x) { @@ -45,7 +47,7 @@ long double asinl(long double x) } else if (expt < BIAS-1) { /* |x|<0.5 */ if (expt < ASIN_LINEAR) { /* if |x| is small, asinl(x)=x */ /* return x with inexact if x!=0 */ - if (huge+x > one) + if (huge+x > 1.0) return x; } t = x*x; @@ -55,7 +57,7 @@ long double asinl(long double x) return x + x*w; } /* 1 > |x| >= 0.5 */ - w = one - fabsl(x); + w = 1.0 - fabsl(x); t = w*0.5; p = P(t); q = Q(t);