Alex Herbert created NUMBERS-171:
------------------------------------
Summary: Update the InverseErfc function to support the full range
of x in [0, 2]
Key: NUMBERS-171
URL: https://issues.apache.org/jira/browse/NUMBERS-171
Project: Commons Numbers
Issue Type: Improvement
Components: gamma
Affects Versions: 1.0
Reporter: Alex Herbert
Assignee: Alex Herbert
The InverseErfc function computes the inverse complementary error function
using the identity with the inverse error function:
{noformat}
inverse erfc(x) = inverse erf(1-x)
{noformat}
This suffers from loss of precision when {{x -> 0}}. The minimum supported
value is 2^-53. Accuracy reduces as this value is approached. Beyond it the
function returns infinity.
A dedicated implementation does not require use of 1 - x and can compute to the
minimum supported 64-bit value. Example output from the matlab erfcinv function:
{noformat}
erfcinv(2^-53) = 5.863584748755168
erfcinv(5e-324) = 27.216482834230213
{noformat}
The Boost C++ library has an implementation for the inverse erf accurate to
double min value. The license is compatible with the Apache license. I suggest
an internal implementation of the Boost method to update the function to
support the full range of the argument x.
See:
Boost error function inverses:
[https://www.boost.org/doc/libs/1_77_0/libs/math/doc/html/math_toolkit/sf_erf/error_inv.html]
STATISTICS-37
--
This message was sent by Atlassian Jira
(v8.3.4#803005)