bos/statistics — Issue #12: logGammaL loses precision near zero
Author: Shimuuar
Created: 2011-10-14 14:22:14+00:00
State: open

logGammaL loses precision near zero. For parameters less than 1e-3 it do not provide 14 digits promised by documentation any more. Precision of logGamma deteriorates much slower in this range and reach 1e-14 for x < 1e-4. I don't know whether this is property of algorithm or bug in implementation.

x relative error
1.25e-6 2.335247745808626e-11
6.82e-5 4.5200406627037583e-13
2.46e-4 1.2419479169108893e-13
8.8e-4 7.069995230776526e-14
3.12e-3 7.69901613260452e-16

Gamma function value up to 20 decimal digits were computed using mpmath python library.