csnlp.util.math.godfrey_coefficients#
- csnlp.util.math.godfrey_coefficients(g, n, scaled=True)[source]#
Computes the coefficients of the Godfrey series for the Lanczos’ approximation of the gamma function.
- Parameters:
- gint or float
The constant \(g\) in the Lanczos’ approximation.
- nint
The number of coefficients to compute.
- precint, optional
The precision of the computations for
decimal.Decimal, by default 128.
- Returns:
- array of decimal.Decimal
Returns a 1D array of the coefficients of the Godfrey series. These are instances of
decimal.Decimal.
- Return type:
Notes