Skip to content
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

Numerical instability in the derivative of the upper gamma function #10

Open
AlexisFremond opened this issue May 31, 2023 · 0 comments
Open

Comments

@AlexisFremond
Copy link
Collaborator

AlexisFremond commented May 31, 2023

The computation of the derivative of the upper gamma function in

def _jac_uppergamma_c(c: np.ndarray, x: np.ndarray) -> np.ndarray:
     return shifted_laguerre(lambda s: np.log(s) * s ** (c - 1), x, ndim=np.ndim(x))

is unstable for low values of the parameters. The numerical result diverges from the true value as parameters go to 0. Test example : c = 0.001, x = 0.002.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant