Boost logo

Boost :

Subject: Re: [boost] [Review Request] Multiprecision Arithmetic Library
From: Andrii Sydorchuk (sydorchuk.andriy_at_[hidden])
Date: 2012-04-03 05:05:39

> Just a crazy idea ... what about if the exponent is a big integer as
> well? And the mantissa ... guess you can go all crazy, hope this is
> supported by the library!

My main point against this idea would be that this might drop performance a
As far as I know GMP library also uses 64 bit exponent for floating-point

Is there any reason not to make the exponent type a template parameter so
> that
> the user can chose arbittrarily instead of trying to anticipate future
> uses of
> the library?

I would suggest this to be a good solution. At least support of int32 and
int64 via template parameter would be vital.

Yeah -- the diameter of the observable universe (not the observed universe
> -- the physically observable universe) in Plank units (the smallest
> physically meaningful length according to QM) is about 1.5*2^204, so 9 bits
> (positive and negative exponents) is all that is required to express the
> exponent for any physical distance in any physically meaningful units.

I have some experience with implementing multiprecision geometric
At some point I needed to cast 2048 bit big integer to 64 bit double and
the problem is
that double is not capable to handle it. This is so far the only issue I
encountered with
limitation of 11 bits exponent. Also we might consider the fact that
IEEE754 architecture for
128 bit double has 15 bit exponent the same as for the 80 bit double.


Unsubscribe & other changes:

Boost list run by bdawes at, gregod at, cpdaniel at, john at