Some basic questions

"Dr. Ing. Carlos López" carlos.lopez at
Thu Dec 21 15:31:30 CET 2006

Hello Chris:

Chris Saunders wrote:

>Hi Carlos
>I am not a GMP expert but I am a programmer who uses GMP.
>As to your first question GMP has three number types integer, real and
>rational each of these types has its own separate representation in memory.
>Each of these types can consume as much memory as the particular computer in
>use will allow.
Well... it is not obvious to me the relationship between available 
memory and the way a number is represented.
To clarify a little bit: I am looking for something like "... a GMP real 
is represented with a mantissa of NMANT bits and an exponent of NEXP 
bits, being NMANT user defined, and NEXP defined at compile time..."

>I am not certain of the answer to the second question but I believe the
>answer is no.
OK, but how to estimate a reliable tolerance given the (yet unknown to 
me) user defined parameters?

>For the third question the answer is that the more memory your computer has
>then the largest floating point number can be larger.
This might be true or not, depending on the way they are represented. To 
say something, the largest representable double precision number is 
unrelated with the available memory. Another thing is the largest total 
number of double precision number which might fit into memory.
I might agree that the above looks confusing: I am looking for the 
Overflow Level (largest finite and positive representable number), the 
Underflow level (i.e. smallest positive, non zero representable number), 
etc. all of them as functions of the (yet unkown to me) user defined 
parameters (like NMANT, NEXP, etc.)

>I hope this is clear enough and helpful.
>Chris Saunders
>-----Original Message-----
>From: gmp-discuss-bounces at [mailto:gmp-discuss-bounces at] On
>Behalf Of Dr. Ing. Carlos López
>Sent: Thursday, December 21, 2006 8:16 AM
>To: gmp-discuss at
>Subject: Some basic questions
>Hello everybody:
>I would like to know if there is a place where to find some basic
>about GMP. By "basic" I meant non-programmer info, but general one.
>I am looking for:
>.- How a number is represented in GMP
>.- Is there something equivalent to the machine epsilon in GMP? If not, how
>may I estimate a "tolerance" from the parameters which define the GMP
>.- Which is the largest representable floating point? An the underflow
>gmp-discuss mailing list
>gmp-discuss at
-------------- next part --------------
An HTML attachment was scrubbed...

More information about the gmp-discuss mailing list