Skip to content

Commit

Permalink
Update to Commons Numbers implementation of reference Erf function
Browse files Browse the repository at this point in the history
  • Loading branch information
aherbert committed Nov 14, 2024
1 parent a748191 commit 5ac6634
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
import java.math.BigDecimal;
import java.math.MathContext;
import java.util.function.DoubleUnaryOperator;
import org.apache.commons.math3.special.Erf;
import org.apache.commons.numbers.core.Sum;
import org.apache.commons.numbers.gamma.Erf;
import org.apache.commons.rng.UniformRandomProvider;
import org.apache.commons.statistics.descriptive.Mean;
import org.junit.jupiter.api.Assertions;
Expand Down Expand Up @@ -848,7 +848,7 @@ void testErf(RandomSeed seed) {
for (int i = 0; i < 10; i++) {
final double x = r.nextDouble();
for (int j = 1; j <= 5; j++) {
Assertions.assertEquals(Erf.erf(x * j), MathUtils.erf(x * j), 1e-6);
Assertions.assertEquals(Erf.value(x * j), MathUtils.erf(x * j), 1e-6);
}
}
}
Expand Down

0 comments on commit 5ac6634

Please sign in to comment.