3

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?

unixman83
  • 9,421
  • 10
  • 68
  • 102

2 Answers2

12

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.

Drew Hall
  • 28,429
  • 12
  • 61
  • 81
5

No. Floats go to Inf or -Inf

Anycorn
  • 50,217
  • 42
  • 167
  • 261