naginterfaces.library.specfun.erfcx_​real_​vector

naginterfaces.library.specfun.erfcx_real_vector(x)[source]

erfcx_real_vector returns an array of values of the scaled complementary error function .

For full information please refer to the NAG Library document for s15au

https://support.nag.com/numeric/nl/nagdoc_30.2/flhtml/s/s15auf.html

Parameters
xfloat, array-like, shape

The argument of the function, for .

Returns
ffloat, ndarray, shape

, the function values.

ivalidint, ndarray, shape

contains the error code for , for .

No error.

is too large and positive. The threshold value is the same as for = 1 in erfcx_real().

was in the interval . The threshold values are the same as for = 2 in erfcx_real().

is too small and positive. The threshold value is the same as for = 3 in erfcx_real().

Raises
NagValueError
(errno )

On entry, .

Constraint: .

Warns
NagAlgorithmicWarning
(errno )

On entry, at least one value of produced a result with reduced accuracy.

Check for more information.

Notes

erfcx_real_vector calculates approximate values for the scaled complementary error function

for an array of arguments , for .

Let be the root of the equation (then ). For the value of is based on the following rational Chebyshev expansion for :

where denotes a rational function of degree in the numerator and in the denominator.

For the value of is based on a rational Chebyshev expansion for : for the value is based on the expansion

and for it is based on the expansion

For each expansion, the specific values of and are selected to be minimal such that the maximum relative error in the expansion is of the order , where is the maximum number of decimal digits that can be accurately represented for the particular implementation (see machine.decimal_digits).

Asymptotically, . There is a danger of setting underflow in whenever , where is the largest positive model number (see machine.real_largest) and is the smallest positive model number (see machine.real_smallest). In this case erfcx_real_vector exits with = 1 and returns with . For in the range , where is the machine precision, the asymptotic value is returned for , , and erfcx_real_vector exits with = 1.

There is a danger of setting overflow in whenever . In this case erfcx_real_vector exits with = 1 and returns with .

References

NIST Digital Library of Mathematical Functions

Cody, W J, 1969, Rational Chebyshev approximations for the error function, Math.Comp. (23), 631–637