[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: integer overflow vs float overflow
- From: Milind Gupta <milind.gupta@...>
- Date: Tue, 12 May 2015 17:36:45 -0700
I see that C wraps integer overflow but float reaches 1.#INF00. C must be doing what the processor implements. Lua 5.3 also wraps integer overflow for float overflow it gives inf. So does Lua check specifically when float overflow happens and substitute inf in place of 1.#INF00?
If it does is it possible to have integer arithmetic also saturating to inf rather than wrapping to minimum?