Re: arbitrary precision



Steven G. Kargl wrote:

GMP and MPFR are required for compilation. The internal representation
for INTEGER uses a mpz_t from GMP and the internal representation for
REAL uses a mpfr_t from MPFR. Once one compiles their Fortran code,
neither GMP not MPFR is required to run the resulting executable.

OK, thanks for the explaination.

I did
not pursue making this a permanent feature of gfortran because I did
not want to make GMP and MPFR required libraries at runtime.

I agree with you. That should not be the default.
BTW it would me useful to have an addition module to enable this
feature.
AFAIK it is already possible with new gfortran (4.6?) and libquad.

I no
longer have the patch, and I can't find it in my email archive (which may
have been a victim of hard drive failure).

Of course, the libraries should be available to a programmer, and yes,
the libraries are written in C. So, in principle, one can use ISO C Binding
to access them.

I've read a bit of MPFR source code, and it seems that its datatypes
(mpfr_t) are represented by mpfr_ptr.
Of course there is no equivalent datatype in ISO_C_BINDING and mpfr_ptr
doesn't seem to be a "struct".
Can you suggest to me how can I map it to a Fortran TYPE?

--
Lurkos
.



Relevant Pages

  • Re: arbitrary precision
    ... Getting gfortran to define the type is trivial and constant-folding ... It seems that gcc requires GMP and MPFR, but I couldn't understand if it ... The gcc family of compilers includes one for Fortran, ...
    (comp.lang.fortran)
  • Re: arbitrary precision
    ... REAL uses a mpfr_t from MPFR. ... Once one compiles their Fortran code, ... neither GMP not MPFR is required to run the resulting executable. ... It was a change to the underlying Fortran type system ...
    (comp.lang.fortran)
  • Re: arbitrary precision
    ... It seems that gcc requires GMP and MPFR, but I couldn't understand if it ... longer have the patch, and I can't find it in my email archive (which may ... Of course, the libraries should be available to a programmer, and yes, ...
    (comp.lang.fortran)
  • Re: Solaris 10 Sparc: problems building gcc from source
    ... the latest gcc version. ... After installing all dependencies (m4, ... make, gmp, mpfr) and adjusting the path, it still comes with this message: ...
    (comp.unix.solaris)
  • Re: Solaris vs Linux vs FreeBSD on SPARC Machine (was: Re: Was: More FreeBSD Problems! Graphics are
    ... Recompile GMP and MPFR as 32 bit binaries. ...
    (comp.unix.bsd.freebsd.misc)