Do doubles suffer from overflow?
Asked Answered
P

2

4

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?

Pucida answered 20/4, 2012 at 3:13 Comment(0)
F
13

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.

Fango answered 20/4, 2012 at 3:14 Comment(0)
S
5

No. Floats go to Inf or -Inf

Slaw answered 20/4, 2012 at 3:15 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.