Boost logo

Boost :

From: Phil Endecott (spam_from_boost_dev_at_[hidden])
Date: 2007-05-07 12:19:36


Arseny wrote:
> I am the student that was lucky enough to be selected as the developer of
> Boost Bigint library as a Summer Of Code project. I've started working on
> the project earlier than I had to, and there is a header draft ready which
> I'd like to share with you - there are some issues that are not quite clear
> (I've marked them with comments), and I would very much like to hear
> possible problems with the current interface/suggestions about
> improvement/etc.

Looks good. Some quick thoughts:

- Have you considered conversions to/from floating-point?
- Have you considered using Boost.Operators?
- Are logical operations well defined for negative operands with
different numbers of bits? (e.g. -1 | 12345) Also, what does ~ do?
Are different signed and unsigned types needed?
- I take it that this class dynamically allocated enough memory for the
value. Can you quantify the performance penalty that this imposes
compared to declaring the number of bits in advance (e.g. bigint<256>)
and statically allocating that much memory?

You may have seen my posts here about a fixed point library recently.
I currently use Boost.Integer to choose int8_t, int16_t, int32_t or
int64_t as an implementation type. It would be useful to be able to
use bigint as an implementation type when the number of bits required
exceeds 64.

Regards,

Phil.


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