Boost logo

Boost :

Subject: Re: [boost] New Boost.XInt Library, request preliminary review
From: DE (satan66613_at_[hidden])
Date: 2010-03-26 12:55:00


on 26.03.2010 at 8:41
 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'm writing this in the wee hours of March 26th, I hope it isn't held
> in the moderation queue for too long.)

i had a look at the docs and i find the lib pretty cool
the docs seem pretty clear to me (even though i don't like this plain
style of docs)
i didn't evaluate the implementation and haven't tried to test it

i have a copuple of suggestions

first, to make 'xint::integer' consistent (if i were you) i'd make all
public member functions non-member friend functions because 'int' and
other fundamentals have no member functions

and second, the docs lack algorithmic complexity estimation for
operations
as an end user i would like to know the order of time and/or space an
operation will cost me

BTW i like the presence of implicit sharing
my only question is can i make it (the sharing) thread safe by defining
'XINT_THREADSAFE'? (hm... here arises a question about operations thread
safety notes in the docs)

i don't like the template constructor however you can ignore this
point since i can not provide any arguments yet

what about compile time fixed precision ints? like 'xint::fixed<128>'
with '128' denoting number of bits (or bytes?)

-- 
Pavel

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