lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

On Saturday, May 2, 2015, Milind Gupta <> wrote:

Convert an overflow result to floating point seems tempting, but
we do not see it as a useful/practical option. First, it is quite
expensive to check multiplication overflows in ANSI C. Second, if you
are computing with integers, you probably need a correct result, not a
rough aproximation.

I was wondering so does it mean we have to be careful when we use integer number and floating number into our programs? If that is the case wouldn't it be easier if integer type was defined separately allowing its usage explicitly when needed and thought out?



Do you mean something stronger than math.type?

It almost never matters, so the provided approach seems reasonable, I think.