Paul.Zimmermann at loria.fr
Fri Mar 12 11:06:50 CET 2010
> >> MPFR requires GMP; for example its custom allocators seem to be set
> >> using mp_set_memory_functions().
> > more importantly MPFR is based on GMP's mpn layer, which is crucial
> > for MPFR
> > efficiency.
> What do you mean by "more importantly" - I made a Guile SMOB, and then
> custom allocators are necessary to make use of its conservative GC.
I mean that if there was no custom allocators in GMP, it would take a few
days or weeks to implement them. But if there was no mpn layer in GMP, it
would take years to implement them (I mean as efficient as GMP is)!
> But anyway, MPFR is just another floating point type on top of GMP.
> I have an idea of yet another floating point type, where the (binary)
> precision is computed automatically based on the operation and its
> arguments. Right now, it has to be done by hand for each operation, it
right, with MPFR the user has a full control of the precision and rounding
modes. Note that the C++ interfaces for MPFR already do what you want to do:
when writing "a = b + c" they automatically determine the precision of a
(with different strategies depending on the particular interface).
But maybe this is off-topic for the gmp-discuss list. I suggest we continue
to discuss on the MPFR list if needed.
More information about the gmp-discuss