Alex Herbert created NUMBERS-221:
------------------------------------
Summary: Update Digamma and Trigamma accuracy from single to
double precision
Key: NUMBERS-221
URL: https://issues.apache.org/jira/browse/NUMBERS-221
Project: Commons Numbers
Issue Type: Improvement
Components: gamma
Affects Versions: 1.3
Reporter: Alex Herbert
Assignee: Alex Herbert
The Digamma and Trigamma functions compute the result to 1e-8 relative or 1e-8
absolute error, whichever is lower. This is single precision.
These functions use a polynomial approximation for the asymptotic value at
large x after a direct sum of terms with small x. The functions can be updated
to use the 53-bit precision implementation from the Boost C++ library.
This Boost implementation is a rational function with more terms. However the
functions require a much smaller shift of x to the range supported by its
rational functions than the current di/trigamma implementations which shift
input x to above 49. The Boost digamma function shifts x < 10 to the range \[1,
2\] containing the root; any x > 10 uses a rational function. Boost trigamma
has rational functions for any x > 1. It is expected that runtime performance
will not be magnitudes different, and accuracy will change from single to
double precision.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)