lua-users home
lua-l archive

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


> No. 2^i always needs just a single bit of precision in the
> mantissa. Only the exponent changes.

This is only true if you know the number is a power of 2. (But then you
don't even need the number, only the power. And you don't need to call
fmod either). If you are handling numbers in general, 2^i needs all its
zeros in the mantissa to tell it apart from 2^i + delta.

-- Roberto