float lower limit at given precision

Slava Feshchenko slavaf2000 at gmail.com
Thu Feb 23 22:38:22 CET 2012


Hello Jacopo,

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
gives you much higher precision than double. If you require high precision
in decimal floating point (base 10), rather than binary (base 2), I
recommend you a different library instead - decNumber. It does pretty much
the same thing as GNU MP, but works in decimal rather than binary. So it's
capable of representing values such as 0.1 exactly and not as
0.999999999999... etc. Depending on the range you need, it can either work
really fast with up to 34 digits of precision (decimal128) or slower (I
believe around 3 times slower) arbitrary precision of up to 999,999,999
digit significand and an exponent of the same range. Here is the link:

http://speleotrove.com/decimal/




On Thu, Feb 23, 2012 at 4:15 PM, Jacopo Nespolo <j.nespolo at gmail.com> wrote:

> Hello everyone,
> this is my first message here: I'm a student in theoretical physics at
> University of Pisa, Italy.
>
> I have just started my thesis, and I need to diagonalise a matrix with
> great precision. Unfortunately, after some research, I didn't find any
> suitable option ready to use, so I'm translating a couple of routines
> of the GNU Scientific Library from double to mpf_t.
>
> In one routine, I need to chop off the small elements from a vector of
> mpf_t. The problem is I cannot understand what small means in this
> case.  For those familiar with GSL, I need the equivalent of
> GSL_DBL_EPSILON.
> Hopefully some of you will know.
>
> Thanks a lot,
> Jacopo
> _______________________________________________
> gmp-discuss mailing list
> gmp-discuss at gmplib.org
> https://gmplib.org/mailman/listinfo/gmp-discuss
>


More information about the gmp-discuss mailing list