5 ms·
Gcc collapses acos(cos(x)) to x on -O2? Surely not since this isn't even accurate for x outside of -pi to pi. That's ignoring floating point errors that make t
by tgb 8y ago
Gcc collapses acos(cos(x)) to x on -O2? Surely not since this isn't even accurate for x outside of -pi to pi. That's ignoring floating point errors that make those two different which I thought was a different optimization flag, though I'm not sure about that.
- improbable22 8y agoWell, here it's cos(acos(x)) and sin(acos(x)), which are easier. But still that's pretty smart, I did not know this.