diff options
Diffstat (limited to 'lib/libm/tgammal.c')
| -rw-r--r-- | lib/libm/tgammal.c | 42 |
1 files changed, 15 insertions, 27 deletions
diff --git a/lib/libm/tgammal.c b/lib/libm/tgammal.c index 54270091..ead0f69d 100644 --- a/lib/libm/tgammal.c +++ b/lib/libm/tgammal.c @@ -68,17 +68,14 @@ Peak error = 1.83e-20 Relative error spread = 8.4e-23 */ static const long double P[8] = { - 4.212760487471622013093E-5L, 4.542931960608009155600E-4L, - 4.092666828394035500949E-3L, 2.385363243461108252554E-2L, - 1.113062816019361559013E-1L, 3.629515436640239168939E-1L, + 4.212760487471622013093E-5L, 4.542931960608009155600E-4L, 4.092666828394035500949E-3L, + 2.385363243461108252554E-2L, 1.113062816019361559013E-1L, 3.629515436640239168939E-1L, 8.378004301573126728826E-1L, 1.000000000000000000009E0L, }; static const long double Q[9] = { - -1.397148517476170440917E-5L, 2.346584059160635244282E-4L, - -1.237799246653152231188E-3L, -7.955933682494738320586E-4L, - 2.773706565840072979165E-2L, -4.633887671244534213831E-2L, - -2.243510905670329164562E-1L, 4.150160950588455434583E-1L, - 9.999999999999999999908E-1L, + -1.397148517476170440917E-5L, 2.346584059160635244282E-4L, -1.237799246653152231188E-3L, + -7.955933682494738320586E-4L, 2.773706565840072979165E-2L, -4.633887671244534213831E-2L, + -2.243510905670329164562E-1L, 4.150160950588455434583E-1L, 9.999999999999999999908E-1L, }; /* @@ -117,11 +114,9 @@ Peak error = 9.44e-21 Relative error spread = 8.8e-4 */ static const long double STIR[9] = { - 7.147391378143610789273E-4L, -2.363848809501759061727E-5L, - -5.950237554056330156018E-4L, 6.989332260623193171870E-5L, - 7.840334842744753003862E-4L, -2.294719747873185405699E-4L, - -2.681327161876304418288E-3L, 3.472222222230075327854E-3L, - 8.333333333333331800504E-2L, + 7.147391378143610789273E-4L, -2.363848809501759061727E-5L, -5.950237554056330156018E-4L, + 6.989332260623193171870E-5L, 7.840334842744753003862E-4L, -2.294719747873185405699E-4L, + -2.681327161876304418288E-3L, 3.472222222230075327854E-3L, 8.333333333333331800504E-2L, }; #define MAXSTIR 1024.0L @@ -133,11 +128,9 @@ static const long double SQTPI = 2.50662827463100050242E0L; * Peak relative error 4.2e-23 */ static const long double S[9] = { - -1.193945051381510095614E-3L, 7.220599478036909672331E-3L, - -9.622023360406271645744E-3L, -4.219773360705915470089E-2L, - 1.665386113720805206758E-1L, -4.200263503403344054473E-2L, - -6.558780715202540684668E-1L, 5.772156649015328608253E-1L, - 1.000000000000000000000E0L, + -1.193945051381510095614E-3L, 7.220599478036909672331E-3L, -9.622023360406271645744E-3L, + -4.219773360705915470089E-2L, 1.665386113720805206758E-1L, -4.200263503403344054473E-2L, + -6.558780715202540684668E-1L, 5.772156649015328608253E-1L, 1.000000000000000000000E0L, }; /* 1/tgamma(-x) = z P(z) @@ -147,11 +140,9 @@ static const long double S[9] = { * Relative error spread = 2.5e-24 */ static const long double SN[9] = { - 1.133374167243894382010E-3L, 7.220837261893170325704E-3L, - 9.621911155035976733706E-3L, -4.219773343731191721664E-2L, - -1.665386113944413519335E-1L, -4.200263503402112910504E-2L, - 6.558780715202536547116E-1L, 5.772156649015328608727E-1L, - -1.000000000000000000000E0L, + 1.133374167243894382010E-3L, 7.220837261893170325704E-3L, 9.621911155035976733706E-3L, + -4.219773343731191721664E-2L, -1.665386113944413519335E-1L, -4.200263503402112910504E-2L, + 6.558780715202536547116E-1L, 5.772156649015328608727E-1L, -1.000000000000000000000E0L, }; static const long double PIL = 3.1415926535897932384626L; @@ -166,10 +157,7 @@ static long double stirf(long double x) /* For large x, use rational coefficients from the analytical expansion. */ if (x > 1024.0) - w = (((((6.97281375836585777429E-5L * w + - 7.84039221720066627474E-4L) * - w - - 2.29472093621399176955E-4L) * + w = (((((6.97281375836585777429E-5L * w + 7.84039221720066627474E-4L) * w - 2.29472093621399176955E-4L) * w - 2.68132716049382716049E-3L) * w + |
