lua-users home
lua-l archive

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


Check equality of math.abs(x) with math.huge.

On Apr 10, 2012 2:40 PM, "Patrick Rapin" <toupie300@gmail.com> wrote:
> function isnan(x) return x~=x end
> function isinf(x) return (x+1)==x end

Well, there seems to be a problem with the second one :

> return 1e16
1e+016
> return isinf(1e16)
true