Spaces:
Paused
Paused
Download node_modules/almost-equal/test/test.js from Leon4gr45/UserSyncFrontend: direct link, hf CLI and curl.
- Browser
- Download file 411 Bytes
-
https://huggingface.co/spaces/Leon4gr45/UserSyncFrontend/resolve/main/node_modules/almost-equal/test/test.js
- Command line
-
hf download hf://spaces/Leon4gr45/UserSyncFrontend/node_modules/almost-equal/test/test.js
-
curl -L -o test.js https://huggingface.co/spaces/Leon4gr45/UserSyncFrontend/resolve/main/node_modules/almost-equal/test/test.js
411 Bytes
| var almostEqual = require("../almost_equal.js") | |
| require("tap").test("almost-equal", function(t) { | |
| var a = 100 | |
| , b = 100 + 1e-12 | |
| //Check if a == b up to float precision | |
| t.assert(almostEqual(a, b, almostEqual.FLT_EPSILON, almostEqual.FLT_EPSILON)) | |
| //Check if a == b up to double precision | |
| t.assert(!almostEqual(a, b, almostEqual.DBL_EPSILON, almostEqual.DBL_EPSILON)) | |
| t.end() | |
| }) |