# naginterfaces.library.specfun.gamma_​log_​scaled_​real¶

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

gamma_log_scaled_real returns the value of , the scaled logarithm of the gamma function .

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

https://www.nag.com/numeric/nl/nagdoc_28.5/flhtml/s/s14ahf.html

Parameters
xfloat

The argument of the function.

Returns
slgxfloat

The value of , the scaled logarithm of the gamma function .

Raises
NagValueError
(errno )

On entry, . On failure, the function value returned is zero.

Notes

gamma_log_scaled_real calculates an approximate value for , where . This is a variant of the function (see also gamma_log_real()), which avoids rounding problems for very large arguments by computing with the Stirling approximation factored out.

For , ;

and for , , where is a suitable Remez approximation.

For , the value is undefined; gamma_log_scaled_real returns zero and exits with = 1.

References

NIST Digital Library of Mathematical Functions