Boost logo

Boost :

Subject: Re: [boost] [mp_int] new release
From: Simonson, Lucanus J (lucanus.j.simonson_at_[hidden])
Date: 2008-10-08 14:08:24


Scott McMurray wrote:
>I would be interested in a general facility for arbitrary-sized
>integers (so I could add 2 64-bit numbers on any architecture as
>bounded_int<65>s, for example, with no possibility of overflow), but
>that's out of scope for this proposal. (It would be nice if it could
>be done just with a different allocator, but I don't think that's
>feasible, currently.)

I am also interested in this. It would be very useful in conjunction
with boost::rational. Using gmp's mpq_class for rationals or mp_int
with boost::rational is overkill in my case because I can bound the
precision I need in a given algorithm to a specific number of bits known
at compile time. I would prefer to allocate those as fixed sized
bounded integers on the stack instead of dynamically allocating variable
sized integers, which would confer significant constant factor
improvement in efficiency of both runtime and memory consumption.

Luke


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