Last change
on this file since 6c1585f was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
574 bytes
|
Line | |
---|
1 | /*
|
---|
2 | * This is a AssemblyScript port of the original Java version, which was written by
|
---|
3 | * Gil Tene as described in
|
---|
4 | * https://github.com/HdrHistogram/HdrHistogram
|
---|
5 | * and released to the public domain, as explained at
|
---|
6 | * http://creativecommons.org/publicdomain/zero/1.0/
|
---|
7 | */
|
---|
8 |
|
---|
9 | import ulp from "../ulp";
|
---|
10 |
|
---|
11 | describe("math ulp helper", () => {
|
---|
12 | it("should compute ulp of integer", () => {
|
---|
13 | expect<f64>(ulp(1)).toBe(2.220446049250313e-16);
|
---|
14 | });
|
---|
15 |
|
---|
16 | it("should compute ulp of floating point number", () => {
|
---|
17 | expect<f64>(ulp(0.000333)).toBe(5.421010862427522e-20);
|
---|
18 | });
|
---|
19 | });
|
---|
Note:
See
TracBrowser
for help on using the repository browser.