-
-
Weirdly, the value returned by `143 ** 143` - i.e. the new, experimental exponentiation operator - is closer to the precise result than that returned from ancient stalwart `Math.pow`pic.twitter.com/YuWf3TJC6N
6 replies 1 retweet 27 likesShow this thread -
OK so I think what's happening is that when V8 interprets an exponentiation expression dynamically (e.g. `x ** x`) it drops through to `Math.pow`, but when it sees a constant exponentiation expression (e.g. `99 ** 99`) it computes the result inline using a different routine?pic.twitter.com/akoTkZi4Ag
2 replies 1 retweet 33 likesShow this thread -
The inline routine has the advantage of returning the correct answer, whereas `Math.pow` evidently has some kind of bug
1 reply 0 retweets 12 likesShow this thread -
Furthermore, the inline routine seems to be in use for integers only, so it's not possible to simply retire `Math.pow`'s current (faulty) implementation and use the inline exponentiation dealie insteadpic.twitter.com/HCQuj6Ex5B
1 reply 0 retweets 11 likesShow this thread -
I imagine the separate integer exponentiation routine was hand-written for performance gains over calling `Math.pow` in certain scenarios
2 replies 0 retweets 9 likesShow this thread -
Try this, kids at home! (V8 only AFAIK so Chrome or Node.js)pic.twitter.com/cFB2pWFRlA
5 replies 28 retweets 82 likesShow this thread -
For serious though where/how do I raise this
4 replies 0 retweets 8 likesShow this thread -
For future reference I'm seeing this in 64-bit Chrome 72.0.3626.96 on Windows, and in Node.js 10.15.1 which uses V8 6.8.275.32-node.12
1 reply 0 retweets 3 likesShow this thread -
quarantine 'em Retweeted Mathias Bynens
Reportedly a long-known issue with a fix on its way down the pipelinehttps://twitter.com/mathias/status/1094209241311838210 …
quarantine 'em added,
2 replies 2 retweets 8 likesShow this thread
This appears to be fixed in Chrome 74.0.3729.169.pic.twitter.com/oQXwnoX9Tb
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.