-
Notifications
You must be signed in to change notification settings - Fork 8
Implement the Gamma function with very low relative error #47
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
base: master
Are you sure you want to change the base?
Conversation
…lative error. This commit also extends that function to handle more special cases correctly.
|
It seems the tests fail because The tests compile and run fine on my local machine.
|
|
It may be that updating the |
…d of a const N array. According to godbolt.org both of these implementations result in the same assembly, but since this one is more flexible for the caller we should use this one.
|
If this PR is interesting then this code might also be interesting as it contains functions for computing the incomplete and complementary incomplete Gamma functions. |
I do not have a guarantee that wolfram alpha has it exactly right to the exact floating point number
|
Should the |
Hello!
I found this interesting implementation of the Gamma function by T. Fukushima (same person that published the algorithm I use in the
lambert_wcrate) in Fortran. It has a lower relative error than the current implementation (often within a single ulp), so I thought I could try implementing it in Rust.This PR implements this new Gamma function and makes the tests more stringent to show the reduced error.