-
Notifications
You must be signed in to change notification settings - Fork 174
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding the logarithmic derivative of the gamma function (digamma) to stdlib_specialfunctions_gamma #803
Labels
idea
Proposition of an idea and opening an issue to discuss it
Comments
banana-bred
added
the
idea
Proposition of an idea and opening an issue to discuss it
label
Apr 22, 2024
Below is an example program that prints the values
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Motivation
The logarithmic derivative of the gamma function,
$$\psi(z) = \frac{d}{dz} \ln(\Gamma(z),$$ $k=0$ ) of the polygamma function
$$\psi^{(k)}(z) = \left(\frac{d}{dz}\right)^{k+1} \ln(\Gamma(z)).$$
(AKA the digamma function) is a special case (
The function$\psi(z)$ is typically not as common as $\Gamma(z)$ , but it comes up every now and then in, e.g., the calculation of other special functions, some of which are not yet included in the Fortran stdlib. Does this seem like a reasonable inclusion ? I could implement the digamma function for real/complex arguments (and maybe the polygamma function later). Integer arguments are also possible, similar to how they are currently implemented for the
log_gamma
interface, but it seems more straightforward to require the argument to be real/complex.This would be included in the
stdlib_specialfunctions_gamma
module, unless there's a better place for it.Thoughts ?
Prior Art
No response
Additional Information
No response
The text was updated successfully, but these errors were encountered: