Floating point design

Kevin Ryde user42@zip.com.au
Sat, 28 Jun 2003 08:39:37 +1000


"delta trinity" <deltatrinity@hotmail.com> writes:
>
> Also, since the value is represented in bits, the
> digit on the left-side of the decimal point is always 1 (except, that
> is, for the number '0').  So, many floating points system (IEEE,
> GMP?), simply omit (remove) it from the representation, to save a bit.

mpf (and mpfr) don't omit that high 1 bit, it's easier in the code to
have it present.  We're not constrained by space the way a fixed size
representation like IEEE is.

> For
> addition, you first shift the smallest number's mantissa bits to the
> right, by the difference between the two exponents

For mpf the exponent is in limbs, so in fact the shifting means just
some pointer arithmetic to get the right limbs to line up.