float lower limit at given precision

Torbjorn Granlund tg at gmplib.org
Thu Feb 23 22:50:09 CET 2012


Slava Feshchenko <slavaf2000 at gmail.com> writes:

  I don't necessarily understand what you are doing, but when you say you
  require great precision, i want to warn you that mpf_t might not be your
  best choice since it is still a binary floating point - just arbitrary
  precision, meaning extremely large range. So it behaves just like double or
  float native types, but with much larger (virtually unlimited) range.

This is plain and simply wrong.

The precision is for all practical purposes unlimited, but while the
range is lagre, it is not unlimited.  And no, mpf does not behave like
the C double type, for any meaningful definition of "behave like".

I would suggest that you actually take a quick look at the mpf
documentation before you advice others about its operation.

To answer the original question:

The GMP team usually recommends new project to use mpfr instead of mpf.
This is a GMP extension library, with an API similar to GMP's.

See mpfr.org.

-- 
Torbjörn


More information about the gmp-discuss mailing list