-
-
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 -
Replying to @qntm
I wonder: if you run the dynamic case in a loop a few million times, does the result change to the inline one?
1 reply 0 retweets 13 likes -
-
That, unlike this, is completely correct behaviour for IEEE 754 64-bit floats
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.