This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Evaluate pow(x,n) at compile time
- From: Brad Lucier <lucier at math dot purdue dot edu>
- To: geoffk at geoffk dot org
- Cc: lucier at math dot purdue dot edu (Brad Lucier), gcc-patches at gcc dot gnu dot org, roger at www dot eyesopen dot com
- Date: Thu, 10 Apr 2003 14:46:30 -0500 (EST)
- Subject: Re: [PATCH] Evaluate pow(x,n) at compile time
Geoff:
Re:
> I'm now worried about the sqrt() routine. It's an IEEE requirement
> that sqrt() always give the correct value. Can you be sure that
> there's no case in which your sqrt will produce an incorrect value?
real_sqrt in real.c will, as designed, calculate the correct
IEEE floating-point square root for any format with <= 78 bits in the mantissa.
So, practically speaking, it may be off by more than 1/2 bit for FP formats
that use two IEEE doubles (106 bit mantissa) or for other 128-bit formats.
Brad