Can GMP be replaced by trees?
Tobias Schlüter
tobias.schlueter@physik.uni-muenchen.de
Tue May 18 13:11:00 GMT 2004
Paul Brook wrote:
By changing the core GCC code (for anything more than +-*/) to use MPFR,
rather than going the other way, support for folding particular functions
is naturally shared by all languages supporting those functions - for
example, you get constant folding for most of the C99 <math.h> and
<complex.h> functions "for free" (as MPFR already implements computing
0.5ulp correctly rounded values for those functions). (You also fix the
well-known problem that sqrtl can be folded with incorrect rounding on
systems with 106-bit long double.) Contributions to MPFR to support
functions not already supported help more than just GCC.
This would be my preferred solution.
Tobi: The existing routines for real arithmetic are in real.{c,h}, and do not
involve tree nodes. These would probably be useable as a replacement for GMP.
However I think the best solution would be to convert everything to use MPFR
as described above.
Ok, (I missed that gcc's real.[ch] don't operate on trees).
I openend PR 15515 which is meant to track any efforts in that
direction. We can change this to a non-Fortran bug if people think that
the benefit of this work is not specific to Fortran.
- Tobi
More information about the Gcc
mailing list