[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: integer overflow vs float overflow
- From: Coda Highland <chighland@...>
- Date: Tue, 12 May 2015 17:51:17 -0700
Lua stores floats in their native format. There is no difference
between a C 1.#INF00 and a Lua inf.
On Tue, May 12, 2015 at 5:36 PM, Milind Gupta <email@example.com> wrote:
> 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?