Boost logo

Boost :

Subject: Re: [boost] Looking for some "real world" extended precision integer arithmetic tests
From: John Maddock (boost.regex_at_[hidden])
Date: 2012-01-27 04:38:53


>> Interesting, do you store the length of your voronoi fixed_int separate
>> from the array?
>
> Yes, I do. Even more I also store the sign of the fixed_int in the same
> value (with the size). This means that voronoi fixed_int doesn't use 2's
> complement representation. If leading bytes are not set we won't even
> operate with them (they might be uninitialized). As another small
> advantage
> we will always have opposite value for the smallest possible negative
> integer value representable with the given fixed_int.

Interesting!

I'm going to have to think carefully about that - the whole Raison d'être
for my fixed_int was to emulate a regular 2's complement integer type as
closely as possible. What you have is a variable precision type using fixed
storage?

Lot's to think about, thanks, John.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk