What is the minimum precision allowed for floats.

Paul Zimmermann Paul.Zimmermann at loria.fr
Mon Sep 29 17:16:50 CEST 2008


       Dear Joel,

> But when you point me to the mpfr library I am a bit confused.
> I don't see how mpfr should work for "exactly" 6 bits etc. are you sure it
> works?
> I thought that double precision is minimum there?

the MPFR library does not rely on double precision floating-point numbers
(i.e., machine floating-point numbers). Instead, it uses GMP's mpn class,
to store arbitrary precision floating-point numbers into arrays of 'limbs'.
Thus a 6-bit mantissa will be stored into one limb on a 32-bit computer, with
26 unused bits. For more details, see [FoHaLePeZi07]. A preliminary version
is available on http://hal.inria.fr/inria-00070266/en/.

Paul Zimmermann

@Article{FoHaLePeZi07,
  author = 	 {Laurent Fousse and Guillaume Hanrot and Vincent Lef{\`e}vre
                  and Patrick P{\'e}lissier and Paul Zimmermann},
  title = 	 {{MPFR}: A Multiple-Precision Binary Floating-Point Library
                  With Correct Rounding},
  journal = 	 "ACM Transactions on Mathematical Software",
  volume =       33,
  number =       2,
  year =         2007,
  pages = {article 13},
  annote = {\url{http://doi.acm.org/10.1145/1236463.1236468}}
}



More information about the gmp-discuss mailing list