Boost logo

Boost :

Subject: Re: [boost] New Boost.XInt Library, request preliminary review
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2010-03-26 13:44:08


AMDG

Chad Nelson wrote:
> Hi! I'm a long-time user (and admirer) of the Boost libraries, and I've
> just uploaded a new one to the Boost Vault for consideration: the
> Extended Integer (XInt) library, a unlimited-precision integer library
> that I've been working on for the last few months. I'd like to request a
> preliminary review of it, please.
>
> I know I was supposed to "determine interest" first, but I've seen posts
> going back at least five years, expressing a desire for such a library,
> so I didn't think that was really necessary in this case. :-)
>
> It's not perfect. The code is complete, as is the documentation text.
> But it doesn't yet support auto-linking or Windows DLLs, I'm not sure
> how the test suite would fit into the Boost test system, and I'm not
> sure I've got the Jamfile correct. But it should be sufficient for
> experimental use and review, and I'm eager to hear what you guys think
> of it.
>

I saw a couple of issues:
* The operators should be defined in namespace xint, so they
  will be found by ADL.
* If you provide random functions, it should be as a specialization
  of boost::uniform_int. Ideally, however, boost::uniform_int would
  just work.

random.cpp:80
                std::transform(mString.begin(), mString.end(),
mString.begin(),
                    zero);
this could be
std::fill(mString.begin(), mString.end(), '\0');

In Christ,
Steven Watanabe


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