Re:Fast Inverse Square Root
by usmannk on Monday November 02, 2020 @06:27PM
(#24974682)
Interestingly enough it seems to do the shift first in Swift
[ Parent
| on HN ]
All well-known programming languages will do the shift first.
Re:Fast Inverse Square Root
by thehobgoblin on Monday November 02, 2020 @10:24PM
(#24976003)
I looked at about 20 different "popular" languages and I believe that only 2 (Go and Swift) of them have shifts at a higher precedence than addition.
I think I'm missing a reference/joke =/
Or this might just be another confident but baseless HN commenter assertion.
Re:Fast Inverse Square Root
by copascetic on Tuesday November 03, 2020 @01:13AM
(#24976871)
C, C++, Java, and Rust all have shift as lower precedence than addition/subtraction. Edit: and Javascript, Python.