[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: 5.1 rc mod giving -0 (never just 0)
- From: Roberto Ierusalimschy <roberto@...>
- Date: Mon, 23 Jan 2006 13:05:45 -0200
> 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