deno.land / x / simplestatistic@v7.7.1 / test / error_function.test.js

error_function.test.js
نووسراو ببینە
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/* eslint no-shadow: 0 */
const test = require("tap").test;const ss = require("../");
test("errorFunction", function (t) { test("symmetry", function (t) { t.equal(ss.errorFunction(-1), -ss.errorFunction(1)); t.end(); }); t.end(); test("inverse", function (t) { for (let i = -1; i <= 1; i += 0.01) { t.equal( Math.abs(ss.errorFunction(ss.inverseErrorFunction(i)) - i) < 4 * ss.epsilon, true ); } t.end(); });});
simplestatistic

Version Info

Tagged at
2 years ago