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


On Mon, 14 Apr 2003, Kaveh R. Ghazi wrote:

> If you reject a patch IMHO you need to provide a roadmap which leads
> towards acceptance.  I.e. tell Roger specifically what he needs to do
> in order to get it accepted.  If there is some subset-test or argument

I think it should use an existing implementation of correctly-rounded
arbitrary-precision floating-point functions.  The obvious one to use
would be mpfr in GMP.  (G95 already uses GMP.)  Accumulating new
implementations of floating-point functions - which are tricky to get
right, and have been implemented carefully before - is not a sensible
thing for GCC to do.

Where mpfr doesn't yet support any particular C99 <math.h> function we 
want to fold for constant arguments, an implementation should be 
contributed to GMP rather than adding a local one for GCC.  Likewise an 
implementation of whichever complex arithmetic functions we want to fold 
should be contributed to GMP rather than duplicated in GCC.

All functions folded should have testcases - both ones generated using the
generic program for finding cases where rounding is difficult, and, where
difficult examples can be found theoretically (as for sqrt), examples
found theoretically.

-- 
Joseph S. Myers
jsm28 at cam dot ac dot uk


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