4 ms·
It works if the compiler can't do constant folding, like so: https://godbolt.org/z/nQDrSW https://godbolt.org/z/nQDrSW
by tlb 7y ago
It works if the compiler can't do constant folding, like so: https://godbolt.org/z/nQDrSW https://godbolt.org/z/nQDrSW
- excessive 7y agoYour first line of main is adding -0.0 and -0.0, which is not what I think you intended to show.
- tlb 7y agoOops, you're right. https://godbolt.org/z/pAwqUA https://godbolt.org/z/pAwqUA shows it better. Adding a -0 and +0 together in either order gives +0, using the actual x86-64 addsd instruction.