float lower limit at given precision

Zimmermann Paul Paul.Zimmermann at loria.fr
Tue Feb 28 18:01:24 CET 2012


       Jacopo,

> 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

I guess what you need is 2^(-prec), where prec is the (binary) precision of
your mpf_t numbers.

Paul Zimmermann


More information about the gmp-discuss mailing list