Boost logo

Boost :

From: Richard Peters (r.a.peters_at_[hidden])
Date: 2004-05-12 08:09:23

I have once again uploaded a new version of my big integer library
(available at,
version 0.3). The divison algorithm is completely new, and this time it is
fast (it now uses Knuth's algorithm). The code is also reorganised, which
made it quite easy to build in support for GNU MP and CLN. When either of
those two libraries is available, set BOOST_BIG_INTEGER_USE_GMP or
BOOST_BIG_INTEGER_USE_CLN, and those libraries will be used to implement the
basic arithmetic functions. Those libraries aren't completely supported yet,
a few functions (mostly conversion functions from types larger than int)
need to be implemented correctly (it's kindof hacked together right now),
and most noticeable, cln hasn't got power_mod yet, because I was unable to
find the matching function in the cln library. That aside, it shows that it
is quite easy to make the library work with other libraries to provide
speedy implementations with a uniform interface.

Best regards,

Richard Peters

----- Original Message -----
From: "Joel Young" <jdy_at_[hidden]>
> I made a simple program with some big numbers that demonstrate the
> speed difference:
> The summary is that big_integer is making millions of
> iterator calls and lexicographical_compares, while even
> boost::rational using long long is just making a few calls
> to things like boost::gcd.
> Joel

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