Hacker News
new
past
comments
ask
show
jobs
points
by
woadwarrior01
4 hours ago
|
comments
by
cmovq
3 hours ago
|
[-]
Compilers cannot do this optimization for floating point [1] unless you're compiling with -ffast-math. In general, don't rely on compilers to optimize floating point sub-expressions.
[1]:
https://godbolt.org/z/8bEjE9Wxx
reply
by
woadwarrior01
3 hours ago
|
parent
|
[-]
Right, I totally forgot about floating point non associativity.
reply