问题
Is it possible to have an overflow (wrap around) with a double or a float? What will happen if the maximum (or minimum) value is reached on x86 or x64 hardware?
回答1:
On an IEEE-754 compliant system, overflow results in a special "infinity" (or "minus infinity") value, beyond which any further increment will have no effect.
回答2:
No. Floats go to Inf
or -Inf
来源:https://stackoverflow.com/questions/10239741/do-doubles-suffer-from-overflow