local function isinfinite(f) return f == 1.0 / 0.0 or f == (-1.0) / 0.0 end local fs = {1.5, 1.5 / 0.0, (-1.5) / 0.0} for fs as f do print(isinfinite(f)) end