Sign in
cobalt
/
cobalt
/
71840339e1109efe930df5c60712d91cdcc962a8
/
.
/
src
/
third_party
/
mozjs-45
/
js
/
src
/
tests
/
ecma_6
/
Math
/
log2-approx.js
blob: a9b0305f145af637b684fcbaff47890a00521d1f [
file
] [
log
] [
blame
]
for
(
var
i
=
-
10
;
i
<
10
;
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"
);