gamma_vectorreturns an array of values of the gamma function .
For full information please refer to the NAG Library document for s14an
- xfloat, array-like, shape
The argument of the function, for .
- ffloat, ndarray, shape
, the function values.
- ivalidint, ndarray, shape
contains the error code for , for .
is too large and positive. contains the approximate value of at the nearest valid argument. The threshold value is the same as for = 1 in
is too large and negative. contains zero. The threshold value is the same as for = 2 in
is too close to zero. contains the approximate value of at the nearest valid argument. The threshold value is the same as for = 2 in
is a negative integer, at which values are infinite. contains a large positive value.
- (errno )
On entry, .
- (errno )
On entry, at least one value of was invalid.
Check for more information.
gamma_vectorevaluates an approximation to the gamma function for an array of arguments , for . The function is based on the Chebyshev expansion:
where and uses the property . If where is integral and then it follows that:
There are four possible failures for this function:
if is too large, there is a danger of overflow since could become too large to be represented in the machine;
if is too large and negative, there is a danger of underflow;
if is equal to a negative integer, would overflow since it has poles at such points;
if is too near zero, there is again the danger of overflow on some machines. For small , , and on some machines there exists a range of nonzero but small values of for which is larger than the greatest representable value.
NIST Digital Library of Mathematical Functions