Boost logo

Boost :

Subject: Re: [boost] GSOC Proposal for BIGINT - Long Mail
From: Paul A. Bristow (pbristow_at_[hidden])
Date: 2010-03-25 06:48:45


> -----Original Message-----
> From: boost-bounces_at_[hidden] [mailto:boost-bounces_at_[hidden]] On Behalf Of swagat konchada
> Sent: Wednesday, March 24, 2010 11:21 PM
> To: boost_at_[hidden]; Andrew Sutton
> Subject: [boost] GSOC Proposal for BIGINT - Long Mail
>
> I had a look around in the Boost Sandbox and I found a BigInt implementation
> done by zeux during GSoC 07. I had a look at the code and I wanted to know
> its deficiencies. I'm interested
>
> in proposing some improvements in bigint and new bigdecimal implementation
> that is building on this code. There are 2 questions that I wanted to ask
> the list before moving further on this track:
>
> 1. Is there sufficient interest for a BigDecimal proposal on the lines of
> the Java implementation of BigDecimal (or has there been some prior work
> that can be used as a foundation?)
> 2. What are the deficiencies of bigint that have prevented its inclusion
> into the Boost distribution so as to address the same as part of my GSoC
> proposal.
>
> I did some homework and contrasted the bigint api in Boost and Java and
> found some interesting things that could be done.
> Boost.bigint was written by zeux and he used GMP bigint's features writing
> the Boost.bigint code around it. I think I could learn and analyse more
> after having a look at GMP bigint.

> After all, I think Boost.bigint should be more exhaustive.

On the contrary, I think it should be limited to what you have suggested - but not decimal - that's more worms that you
can chew! You should aim to finish test and document only the basics - and then add operators if time permits. Don't
even think about GCD?

But it is vital that what you produce should fit into the 'numeric_adaptor' scheme mentioned by Barend Gehrels.

But be Boosts_Own_Version of Big int.

It should be correct first rather than fast (anyone who wants speed will plug in the GMP version, if the licence
allows).

You should also study (and use as comparison for testing) Victor Shoup's NTL http://www.shoup.net/ntl/doc/tour.html
(used in the Boost.Math package and http://www.ttmath.org/faq.

See also Kevin Sopp's Boost sandbox version of mp_math - this works on GCC and but not on MSVC and might, with the
authors agreement, provide a starting point.

Good luck.

Paul

---
Paul A. Bristow
Prizet Farmhouse
Kendal, UK   LA8 8AB
+44 1539 561830, mobile +44 7714330204
pbristow_at_[hidden]

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