mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 22:27:35 +00:00
LibJS: Add spec comments and check for edge cases in Math.log2
This commit is contained in:
parent
4813385c9a
commit
eda90b54d4
2 changed files with 23 additions and 3 deletions
|
@ -7,4 +7,7 @@ test("basic functionality", () => {
|
|||
expect(Math.log2(0)).toBe(-Infinity);
|
||||
expect(Math.log2(-2)).toBe(NaN);
|
||||
expect(Math.log2(1024)).toBe(10);
|
||||
expect(Math.log2(NaN)).toBe(NaN);
|
||||
expect(Math.log2(Number.POSITIVE_INFINITY)).toBe(Number.POSITIVE_INFINITY);
|
||||
expect(Math.log2(-0.0)).toBe(Number.NEGATIVE_INFINITY);
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue