mirror of
https://github.com/dlang/phobos.git
synced 2025-04-29 06:30:28 +03:00
Revert the last changeset.
This commit is contained in:
parent
66bdf06479
commit
172ec1dc1a
2 changed files with 1861 additions and 1869 deletions
|
@ -46,13 +46,13 @@ private {
|
|||
/* erfc(x) = exp(-x^2) P(1/x)/Q(1/x)
|
||||
1/8 <= 1/x <= 1
|
||||
Peak relative error 5.8e-21 */
|
||||
immutable real[10] P = [ -0x1.30dfa809b3cc6676p-17, 0x1.38637cd0913c0288p+18,
|
||||
immutable real [] P = [ -0x1.30dfa809b3cc6676p-17, 0x1.38637cd0913c0288p+18,
|
||||
0x1.2f015e047b4476bp+22, 0x1.24726f46aa9ab08p+25, 0x1.64b13c6395dc9c26p+27,
|
||||
0x1.294c93046ad55b5p+29, 0x1.5962a82f92576dap+30, 0x1.11a709299faba04ap+31,
|
||||
0x1.11028065b087be46p+31, 0x1.0d8ef40735b097ep+30
|
||||
];
|
||||
|
||||
immutable real[11] Q = [ 0x1.14d8e2a72dec49f4p+19, 0x1.0c880ff467626e1p+23,
|
||||
immutable real [] Q = [ 0x1.14d8e2a72dec49f4p+19, 0x1.0c880ff467626e1p+23,
|
||||
0x1.04417ef060b58996p+26, 0x1.404e61ba86df4ebap+28, 0x1.0f81887bc82b873ap+30,
|
||||
0x1.4552a5e39fb49322p+31, 0x1.11779a0ceb2a01cep+32, 0x1.3544dd691b5b1d5cp+32,
|
||||
0x1.a91781f12251f02ep+31, 0x1.0d8ef3da605a1c86p+30, 1.0
|
||||
|
@ -62,11 +62,11 @@ immutable real[11] Q = [ 0x1.14d8e2a72dec49f4p+19, 0x1.0c880ff467626e1p+23,
|
|||
/* erfc(x) = exp(-x^2) 1/x R(1/x^2) / S(1/x^2)
|
||||
1/128 <= 1/x < 1/8
|
||||
Peak relative error 1.9e-21 */
|
||||
immutable real[5] R = [ 0x1.b9f6d8b78e22459ep-6, 0x1.1b84686b0a4ea43ap-1,
|
||||
immutable real [] R = [ 0x1.b9f6d8b78e22459ep-6, 0x1.1b84686b0a4ea43ap-1,
|
||||
0x1.b8f6aebe96000c2ap+1, 0x1.cb1dbedac27c8ec2p+2, 0x1.cf885f8f572a4c14p+1
|
||||
];
|
||||
|
||||
immutable real[6] S = [
|
||||
immutable real [] S = [
|
||||
0x1.87ae3cae5f65eb5ep-5, 0x1.01616f266f306d08p+0, 0x1.a4abe0411eed6c22p+2,
|
||||
0x1.eac9ce3da600abaap+3, 0x1.5752a9ac2faebbccp+3, 1.0
|
||||
];
|
||||
|
@ -74,12 +74,12 @@ immutable real[6] S = [
|
|||
/* erf(x) = x P(x^2)/Q(x^2)
|
||||
0 <= x <= 1
|
||||
Peak relative error 7.6e-23 */
|
||||
immutable real[7] T = [ 0x1.0da01654d757888cp+20, 0x1.2eb7497bc8b4f4acp+17,
|
||||
immutable real [] T = [ 0x1.0da01654d757888cp+20, 0x1.2eb7497bc8b4f4acp+17,
|
||||
0x1.79078c19530f72a8p+15, 0x1.4eaf2126c0b2c23p+11, 0x1.1f2ea81c9d272a2ep+8,
|
||||
0x1.59ca6e2d866e625p+2, 0x1.c188e0b67435faf4p-4
|
||||
];
|
||||
|
||||
immutable real[7] U = [ 0x1.dde6025c395ae34ep+19, 0x1.c4bc8b6235df35aap+18,
|
||||
immutable real [] U = [ 0x1.dde6025c395ae34ep+19, 0x1.c4bc8b6235df35aap+18,
|
||||
0x1.8465900e88b6903ap+16, 0x1.855877093959ffdp+13, 0x1.e5c44395625ee358p+9,
|
||||
0x1.6a0fed103f1c68a6p+5, 1.0
|
||||
];
|
||||
|
@ -355,52 +355,44 @@ in {
|
|||
}
|
||||
body
|
||||
{
|
||||
static immutable real[8] P0 =
|
||||
[ -0x1.758f4d969484bfdcp-7, 0x1.53cee17a59259dd2p-3,
|
||||
immutable real[] P0 = [ -0x1.758f4d969484bfdcp-7, 0x1.53cee17a59259dd2p-3,
|
||||
-0x1.ea01e4400a9427a2p-1, 0x1.61f7504a0105341ap+1, -0x1.09475a594d0399f6p+2,
|
||||
0x1.7c59e7a0df99e3e2p+1, -0x1.87a81da52edcdf14p-1, 0x1.1fb149fd3f83600cp-7
|
||||
];
|
||||
|
||||
static immutable real[8] Q0 =
|
||||
[ -0x1.64b92ae791e64bb2p-7, 0x1.7585c7d597298286p-3,
|
||||
immutable real[] Q0 = [ -0x1.64b92ae791e64bb2p-7, 0x1.7585c7d597298286p-3,
|
||||
-0x1.40011be4f7591ce6p+0, 0x1.1fc067d8430a425ep+2, -0x1.21008ffb1e7ccdf2p+3,
|
||||
0x1.3d1581cf9bc12fccp+3, -0x1.53723a89fd8f083cp+2, 1.0
|
||||
];
|
||||
|
||||
static immutable real[10] P1 =
|
||||
[ 0x1.20ceea49ea142f12p-13, 0x1.cbe8a7267aea80bp-7,
|
||||
immutable real[] P1 = [ 0x1.20ceea49ea142f12p-13, 0x1.cbe8a7267aea80bp-7,
|
||||
0x1.79fea765aa787c48p-2, 0x1.d1f59faa1f4c4864p+1, 0x1.1c22e426a013bb96p+4,
|
||||
0x1.a8675a0c51ef3202p+5, 0x1.75782c4f83614164p+6, 0x1.7a2f3d90948f1666p+6,
|
||||
0x1.5cd116ee4c088c3ap+5, 0x1.1361e3eb6e3cc20ap+2
|
||||
];
|
||||
|
||||
static immutable real[10] Q1 =
|
||||
[ 0x1.3a4ce1406cea98fap-13, 0x1.f45332623335cda2p-7,
|
||||
immutable real[] Q1 = [ 0x1.3a4ce1406cea98fap-13, 0x1.f45332623335cda2p-7,
|
||||
0x1.98f28bbd4b98db1p-2, 0x1.ec3b24f9c698091cp+1, 0x1.1cc56ecda7cf58e4p+4,
|
||||
0x1.92c6f7376bf8c058p+5, 0x1.4154c25aa47519b4p+6, 0x1.1b321d3b927849eap+6,
|
||||
0x1.403a5f5a4ce7b202p+4, 1.0
|
||||
];
|
||||
|
||||
static immutable real[8] P2 =
|
||||
[ 0x1.8c124a850116a6d8p-21, 0x1.534abda3c2fb90bap-13,
|
||||
immutable real[] P2 = [ 0x1.8c124a850116a6d8p-21, 0x1.534abda3c2fb90bap-13,
|
||||
0x1.29a055ec93a4718cp-7, 0x1.6468e98aad6dd474p-3, 0x1.3dab2ef4c67a601cp+0,
|
||||
0x1.e1fb3a1e70c67464p+1, 0x1.b6cce8035ff57b02p+2, 0x1.9f4c9e749ff35f62p+1
|
||||
];
|
||||
|
||||
static immutable real[8] Q2 =
|
||||
[ 0x1.af03f4fc0655e006p-21, 0x1.713192048d11fb2p-13,
|
||||
immutable real[] Q2 = [ 0x1.af03f4fc0655e006p-21, 0x1.713192048d11fb2p-13,
|
||||
0x1.4357e5bbf5fef536p-7, 0x1.7fdac8749985d43cp-3, 0x1.4a080c813a2d8e84p+0,
|
||||
0x1.c3a4b423cdb41bdap+1, 0x1.8160694e24b5557ap+2, 1.0
|
||||
];
|
||||
|
||||
static immutable real[8] P3 =
|
||||
[ -0x1.55da447ae3806168p-34, -0x1.145635641f8778a6p-24,
|
||||
immutable real[] P3 = [ -0x1.55da447ae3806168p-34, -0x1.145635641f8778a6p-24,
|
||||
-0x1.abf46d6b48040128p-17, -0x1.7da550945da790fcp-11, -0x1.aa0b2a31157775fap-8,
|
||||
0x1.b11d97522eed26bcp-3, 0x1.1106d22f9ae89238p+1, 0x1.029a358e1e630f64p+1
|
||||
];
|
||||
|
||||
static immutable real[8] Q3 =
|
||||
[ -0x1.74022dd5523e6f84p-34, -0x1.2cb60d61e29ee836p-24,
|
||||
immutable real[] Q3 = [ -0x1.74022dd5523e6f84p-34, -0x1.2cb60d61e29ee836p-24,
|
||||
-0x1.d19e6ec03a85e556p-17, -0x1.9ea2a7b4422f6502p-11, -0x1.c54b1e852f107162p-8,
|
||||
0x1.e05268dd3c07989ep-3, 0x1.239c6aff14afbf82p+1, 1.0
|
||||
];
|
||||
|
|
|
@ -29,43 +29,43 @@ immutable real EULERGAMMA = 0.57721_56649_01532_86060_65120_90082_40243_10421_59
|
|||
|
||||
// Polynomial approximations for gamma and loggamma.
|
||||
|
||||
immutable real[8] GammaNumeratorCoeffs = [ 1.0,
|
||||
immutable real[] GammaNumeratorCoeffs = [ 1.0,
|
||||
0x1.acf42d903366539ep-1, 0x1.73a991c8475f1aeap-2, 0x1.c7e918751d6b2a92p-4,
|
||||
0x1.86d162cca32cfe86p-6, 0x1.0c378e2e6eaf7cd8p-8, 0x1.dc5c66b7d05feb54p-12,
|
||||
0x1.616457b47e448694p-15
|
||||
];
|
||||
|
||||
immutable real[9] GammaDenominatorCoeffs = [ 1.0,
|
||||
immutable real[] GammaDenominatorCoeffs = [ 1.0,
|
||||
0x1.a8f9faae5d8fc8bp-2, -0x1.cb7895a6756eebdep-3, -0x1.7b9bab006d30652ap-5,
|
||||
0x1.c671af78f312082ep-6, -0x1.a11ebbfaf96252dcp-11, -0x1.447b4d2230a77ddap-10,
|
||||
0x1.ec1d45bb85e06696p-13,-0x1.d4ce24d05bd0a8e6p-17
|
||||
];
|
||||
|
||||
immutable real[9] GammaSmallCoeffs = [ 1.0,
|
||||
immutable real[] GammaSmallCoeffs = [ 1.0,
|
||||
0x1.2788cfc6fb618f52p-1, -0x1.4fcf4026afa2f7ecp-1, -0x1.5815e8fa24d7e306p-5,
|
||||
0x1.5512320aea2ad71ap-3, -0x1.59af0fb9d82e216p-5, -0x1.3b4b61d3bfdf244ap-7,
|
||||
0x1.d9358e9d9d69fd34p-8, -0x1.38fc4bcbada775d6p-10
|
||||
];
|
||||
|
||||
immutable real[9] GammaSmallNegCoeffs = [ -1.0,
|
||||
immutable real[] GammaSmallNegCoeffs = [ -1.0,
|
||||
0x1.2788cfc6fb618f54p-1, 0x1.4fcf4026afa2bc4cp-1, -0x1.5815e8fa2468fec8p-5,
|
||||
-0x1.5512320baedaf4b6p-3, -0x1.59af0fa283baf07ep-5, 0x1.3b4a70de31e05942p-7,
|
||||
0x1.d9398be3bad13136p-8, 0x1.291b73ee05bcbba2p-10
|
||||
];
|
||||
|
||||
immutable real[7] logGammaStirlingCoeffs = [
|
||||
immutable real[] logGammaStirlingCoeffs = [
|
||||
0x1.5555555555553f98p-4, -0x1.6c16c16c07509b1p-9, 0x1.a01a012461cbf1e4p-11,
|
||||
-0x1.3813089d3f9d164p-11, 0x1.b911a92555a277b8p-11, -0x1.ed0a7b4206087b22p-10,
|
||||
0x1.402523859811b308p-8
|
||||
];
|
||||
|
||||
immutable real[7] logGammaNumerator = [
|
||||
immutable real[] logGammaNumerator = [
|
||||
-0x1.0edd25913aaa40a2p+23, -0x1.31c6ce2e58842d1ep+24, -0x1.f015814039477c3p+23,
|
||||
-0x1.74ffe40c4b184b34p+22, -0x1.0d9c6d08f9eab55p+20, -0x1.54c6b71935f1fc88p+16,
|
||||
-0x1.0e761b42932b2aaep+11
|
||||
];
|
||||
|
||||
immutable real[8] logGammaDenominator = [
|
||||
immutable real[] logGammaDenominator = [
|
||||
-0x1.4055572d75d08c56p+24, -0x1.deeb6013998e4d76p+24, -0x1.106f7cded5dcc79ep+24,
|
||||
-0x1.25e17184848c66d2p+22, -0x1.301303b99a614a0ap+19, -0x1.09e76ab41ae965p+15,
|
||||
-0x1.00f95ced9e5f54eep+9, 1.0
|
||||
|
@ -83,13 +83,13 @@ real gammaStirling(real x)
|
|||
{
|
||||
// CEPHES code Copyright 1994 by Stephen L. Moshier
|
||||
|
||||
static immutable real[9] SmallStirlingCoeffs = [
|
||||
const real SmallStirlingCoeffs[] = [
|
||||
0x1.55555555555543aap-4, 0x1.c71c71c720dd8792p-9, -0x1.5f7268f0b5907438p-9,
|
||||
-0x1.e13cd410e0477de6p-13, 0x1.9b0f31643442616ep-11, 0x1.2527623a3472ae08p-14,
|
||||
-0x1.37f6bc8ef8b374dep-11,-0x1.8c968886052b872ap-16, 0x1.76baa9c6d3eeddbcp-11
|
||||
];
|
||||
|
||||
static immutable real[9] LargeStirlingCoeffs = [ 1.0L,
|
||||
const real LargeStirlingCoeffs[] = [ 1.0L,
|
||||
8.33333333333333333333E-2L, 3.47222222222222222222E-3L,
|
||||
-2.68132716049382716049E-3L, -2.29472093621399176955E-4L,
|
||||
7.84039221720066627474E-4L, 6.97281375836585777429E-5L
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue