This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: rs6000 LDBL_MAX converts to infinity
On Wed, Mar 03, 2004 at 01:32:59PM -0300, Alexandre Oliva wrote:
> Even if the rounding turns out to be unnecessary, I'd still put it in
> as defensive programming.
Hmph. Unnecessary code is bad code.
1) You start off with a correctly rounded 106 bit mantissa.
2) Subtract off bits 0 to 52, or bits 0 to 52 rounded up, depending on
the value of bit 53.
3) Are there more than 53 bits remaining? If not, there's no need for
rounding.
--
Alan Modra
IBM OzLabs - Linux Technology Centre