Skip to content

Commit 7e1093e

Browse files
committed
Import
1 parent 8a58ac0 commit 7e1093e

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

impl/src/backend.test.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { fairlyAllocateCredit } from "./backend";
22

33
import { strict as assert } from "assert";
44
import test from "node:test";
5-
import * as simplestatistics from "simple-statistics";
5+
import { inverseErrorFunction } from "simple-statistics";
66

77
interface FairlyAllocateCreditTestCase {
88
name: string;
@@ -19,9 +19,7 @@ type Interval = [min: number, max: number];
1919

2020
// https://en.wikipedia.org/wiki/Probit
2121
function normalPpf(q: number, stdDev: number): number {
22-
return (
23-
stdDev * Math.sqrt(2) * simplestatistics.inverseErrorFunction(2 * q - 1)
24-
);
22+
return stdDev * Math.sqrt(2) * inverseErrorFunction(2 * q - 1);
2523
}
2624

2725
const minNForIntervalApprox = 1000;

0 commit comments

Comments
 (0)