4 ms·
A better fix would be to use "-mfpmath=sse" to disable x87 math - this also makes your program slightly faster, whereas -ffloat-store can make it much slower.
by astrange 16y ago
A better fix would be to use "-mfpmath=sse" to disable x87 math - this also makes your program slightly faster, whereas -ffloat-store can make it much slower.
- lifthrasiir 16y agoAh, your point is correct. In my defense, I was just tried to be conservative.
- lallysingh 16y ago.. or not use an algorithm that depends on the hardware implementation of floating point math? How about just comparing the previous & current iteration values? If you're not making any progress, you're done.
- sausagefeet 16y agoYou'd probably want to compare to an epsilon AND exact compare, otherwise you could oscillate between two values.