blob: 954f4c1cf9706d028bcdc8bb32f5df52f47a491e (
plain)
1
2
3
4
5
6
7
8
|
for (var i = -1074; i < 1023; i++)
assertNear(Math.log2(Math.pow(2, i)), i);
assertNear(Math.log2(5), 2.321928094887362);
assertNear(Math.log2(7), 2.807354922057604);
assertNear(Math.log2(Math.E), Math.LOG2E);
reportCompare(0, 0, "ok");
|