For the cases where x is “nearly equal” 0 or x is “nearly equal” 1.
Can the regularizedBeta()
implementation be calculated instead of returning NaN
?
public static void test( ) {
double t =
org.hipparchus.special.Beta.regularizedBeta(
1.0000001, 1.0, 1.0, DEFAULT_EPSILON, MAX_ITERATIONS);
System.out.println(t);
}
In this implementation 0 or 1 will be returned: