Boost logo

Boost :

Subject: Re: [boost] New Boost.XInt Library, request preliminary review
From: Kim Barrett (kab.conundrums_at_[hidden])
Date: 2010-04-06 15:26:26


On Apr 6, 2010, at 11:54 AM, Jeffrey Hellrung wrote:
> Good point. Do you have any references to such packages?

Not really, at this point; it's been too many years since I did any work in this area. Most are buried inside various obsolete and likely unobtainable lisp implementations (where I use the term "lisp" somewhat loosely).

> I'm curious about the implementation advantages and disadvantages of using 2s-complement vs sign+magnitude.

I really don't recall what the tradeoffs were anymore. I know that all of the implementations I actually did any work on used a 2s-complement representation. My present guess is that a signed magnitude representation is probably better if one can make use of COW or move semantics (nothing like either were available in any of the implementations I did any work on). I might even be convinced that signed magnitude is simply better; certainly it was my intent to at least try that choice if I ever needed to write another one. But I wouldn't want to close off that choice point in the xint interface.


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