X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=src%2Fmath%2F__cosl.c;h=9d325768c109d751ab728fdeb3144020843beca7;hb=ffd8ac2dd50f99c3c83d7d9d845df9874ec3e7d5;hp=9ea51ecfe5ec8610dcbb8f753133d9abfd908b6d;hpb=b69f695acedd4ce2798ef9ea28d834ceccc789bd;p=musl diff --git a/src/math/__cosl.c b/src/math/__cosl.c index 9ea51ecf..9d325768 100644 --- a/src/math/__cosl.c +++ b/src/math/__cosl.c @@ -41,19 +41,8 @@ * almost for free from the complications needed to search for the best * higher coefficients. */ -static const double one = 1.0; - -// FIXME -/* Long double constants are slow on these arches, and broken on i386. */ -static const volatile double -C1hi = 0.041666666666666664, /* 0x15555555555555.0p-57 */ -C1lo = 2.2598839032744733e-18; /* 0x14d80000000000.0p-111 */ -#define C1 ((long double)C1hi + C1lo) - -#if 0 static const long double C1 = 0.0416666666666666666136L; /* 0xaaaaaaaaaaaaaa9b.0p-68 */ -#endif static const double C2 = -0.0013888888888888874, /* -0x16c16c16c16c10.0p-62 */ @@ -70,7 +59,7 @@ long double __cosl(long double x, long double y) z = x*x; r = z*(C1+z*(C2+z*(C3+z*(C4+z*(C5+z*(C6+z*C7)))))); hz = 0.5*z; - w = one-hz; - return w + (((one-w)-hz) + (z*r-x*y)); + w = 1.0-hz; + return w + (((1.0-w)-hz) + (z*r-x*y)); } #endif