Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
arkmm
· 8mo ago · 0 comments
Didn't know this technique had a name, but I would think a modern compiler could make this optimization on its own, no?
Comments
[–]
Sesse__
8mo ago
No, it's not equivalent for floating point, so a compiler won't do it unless you do -fassociative-math (or a superset, such as -ffast-math), in which case all correctness bets are off.