Skip to content

Commit 9406e15

Browse files
committed
dstat.tests: Replace usage of approxEqual with isClose in non-test code
approxEqual is deprecated, isClose is the replacement. approxEqual is still widely used in tests, but tat least this won't trigger deprecations in client code.
1 parent 78ce68c commit 9406e15

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

source/dstats/tests.d

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1941,7 +1941,7 @@ double binomialTest(ulong k, ulong n, double p) {
19411941

19421942
immutable mode = cast(long) ((n + 1) * p);
19431943
if(k == mode ||
1944-
approxEqual(binomialPMF(k, n, p), binomialPMF(mode, n, p), 1 - epsilon)) {
1944+
isClose(binomialPMF(k, n, p), binomialPMF(mode, n, p), 1 - epsilon, 1e-5)) {
19451945
return 1;
19461946
} else if(k > mode) {
19471947
immutable double upperPart = binomialCDFR(k, n, p);

0 commit comments

Comments
 (0)