1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 12:27:35 +00:00

LibJS: Add spec comments and check for edge cases in Math.atanh

This commit is contained in:
davidot 2022-11-28 12:03:41 +01:00 committed by Andreas Kling
parent c565cbd30c
commit d4e5644df8
2 changed files with 19 additions and 3 deletions

View file

@ -5,4 +5,7 @@ test("basic functionality", () => {
expect(Math.log1p(-1)).toBe(-Infinity);
expect(Math.log1p(0)).toBe(0);
expect(Math.log1p(1)).toBeCloseTo(0.693147);
expect(Math.log1p(NaN)).toBe(NaN);
expect(Math.log1p(-0.0)).toBe(-0.0);
expect(Math.log1p(Number.POSITIVE_INFINITY)).toBe(Number.POSITIVE_INFINITY);
});