[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- 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.
/s/ Adam
On Tue, May 12, 2015 at 5:36 PM, Milind Gupta <milind.gupta@gmail.com> wrote:
> Hi,
> 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?
>
> Thanks,
> Milind
>