We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8a58ac0 commit 7e1093eCopy full SHA for 7e1093e
impl/src/backend.test.ts
@@ -2,7 +2,7 @@ import { fairlyAllocateCredit } from "./backend";
2
3
import { strict as assert } from "assert";
4
import test from "node:test";
5
-import * as simplestatistics from "simple-statistics";
+import { inverseErrorFunction } from "simple-statistics";
6
7
interface FairlyAllocateCreditTestCase {
8
name: string;
@@ -19,9 +19,7 @@ type Interval = [min: number, max: number];
19
20
// https://en.wikipedia.org/wiki/Probit
21
function normalPpf(q: number, stdDev: number): number {
22
- return (
23
- stdDev * Math.sqrt(2) * simplestatistics.inverseErrorFunction(2 * q - 1)
24
- );
+ return stdDev * Math.sqrt(2) * inverseErrorFunction(2 * q - 1);
25
}
26
27
const minNForIntervalApprox = 1000;
0 commit comments