Implement the Gamma function with very low relative error#47
Implement the Gamma function with very low relative error#47Axect merged 36 commits intoAxect:masterfrom
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 |
Axect
left a comment
There was a problem hiding this comment.
Great improvement! Thank you for great contributions!
I think current implementation |
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.