haskell / math-functions

Special mathematical functions
http://hackage.haskell.org/package/math-functions
BSD 2-Clause "Simplified" License
40 stars 28 forks source link

Investigate logGamma precision near 1 & 2 #59

Closed Shimuuar closed 5 years ago

Shimuuar commented 5 years ago

Testing recurrence Γ(x+1) = x·Γ(x) shows that error is significantly larger than estimate for small x. loggamma_recur_small Error was estimated as follows: δ(logΓ(x+1) - logΓ(x) - log x) =< δ(logΓ(x+1)) + δ(logΓ(x)) + δ(log x) where δ(f(x)) is estimated as ε·f(x).

Shimuuar commented 5 years ago

Fixed by 9045155eb23223deb7e349ca87c6acccccfa830f