This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]