[Boost][gsoc]Intrest - big integer library

Hello all, I'd like to propose new library for boost - a Big Integer library. Boost has plenty of applications build upon it and some of them has to use integers greater that those ensured by C++ standard. What is more some of them needs even Pythonlike "unbounded" integers. What I am proposing is library implementing cross-platform library supporting such integers working as standard arithmetic type. Is it a good proposal for GSoC project and who would you recommend as a possible mentor for such project? Pozdrawiam, Kamil Witecki.

Hi Kamil, On 15 February 2010 09:45, Kamil Witecki <kamil.witecki@gmail.com> wrote:
Hello all, I'd like to propose new library for boost - a Big Integer library. Boost has plenty of applications build upon it and some of them has to use integers greater that those ensured by C++ standard. What is more some of them needs even Pythonlike "unbounded" integers. What I am proposing is library implementing cross-platform library supporting such integers working as standard arithmetic type.
Is it a good proposal for GSoC project and who would you recommend as a possible mentor for such project?
A Big Integer proposal was started back in 2007. I'm not sure of the status of the library or how far from being complete it is, but you may want to take a look at it: https://svn.boost.org/trac/boost/browser/sandbox/SOC/2007/bigint/ Cheers, Darren

On 15 February 2010 04:45, Kamil Witecki <kamil.witecki@gmail.com> wrote:
I'd like to propose new library for boost - a Big Integer library.
Is it a good proposal for GSoC project and who would you recommend as a possible mentor for such project?
Given the number of times which a big integer library has been started, I'd be wary of suggesting it as a GSoC project. Since there are already many C big integer libraries (with various licenses), I'd be far more interested in an expression template system that would let me hook in the operations I need. That way if I'm ok with LGPL I can just use GMP, for instance. Also, a naive implementation could be provided for testing and verification. I remember hearing that someone had started something like that, but I don't know its progress. ~ Scott

-----Original Message----- From: boost-bounces@lists.boost.org [mailto:boost-bounces@lists.boost.org] On Behalf Of Kamil Witecki Sent: Monday, February 15, 2010 9:46 AM To: Boost@lists.boost.org Subject: [boost] [Boost][gsoc]Intrest - big integer library
I'd like to propose new library for boost - a Big Integer library. Boost has plenty of applications build upon it and some of them has to use integers greater that those ensured by C++ standard. What is more some of them needs even Pythonlike "unbounded" integers. What I am proposing is library implementing cross-platform library supporting such integers working as standard arithmetic type.
Is it a good proposal for GSoC project and who would you recommend as a possible mentor for such project?
Of course, there is still a need for a Boost library to handle big ints. But there are many conflicting 'absolutely essential requirements'. For some a Boost licence is essential, for others using the definitive but limited license GMP bignum is fine. For some 256 bits would be useful, for others they must be infinitely expandable. For some if it gets the right answer, time is unimportant - for others speed is paramount. You should search through the archives for at least the following to see what a minefield it is! bigint Big integer library by Richard Peters mp_int by Kevin Sopp Introduction of numeric_adaptor - switching the underlying mechanism. Arbitrary precision arithmetic [mp_math] a multi precision signed integer library Using NTL and MPFR Many of the problems are also in testing and documentation to get something that is good enough to review, revise, and revise and get accepted during the GSoC period. Good luck! Paul PS Of course there is also a need for floating point ;-) But this is an even bigger can of worms! --- Paul A. Bristow Prizet Farmhouse Kendal, UK LA8 8AB +44 1539 561830, mobile +44 7714330204 pbristow@hetp.u-net.com

But there are many conflicting 'absolutely essential requirements'.
For some a Boost licence is essential, for others using the definitive but limited license GMP bignum is fine.
For some 256 bits would be useful, for others they must be infinitely expandable.
For some if it gets the right answer, time is unimportant - for others speed is paramount Isn't soemthing some generic programming can solve by either using
Paul A. Bristow wrote: policies or specialization absed on oeprator selection ? -- ___________________________________________ Joel Falcou - Assistant Professor PARALL Team - LRI - Universite Paris Sud XI Tel : (+33)1 69 15 66 35

-----Original Message----- From: boost-bounces@lists.boost.org [mailto:boost-bounces@lists.boost.org] On Behalf Of joel falcou Sent: Tuesday, February 16, 2010 5:27 PM To: boost@lists.boost.org Subject: Re: [boost] [Boost][gsoc]Intrest - big integer library
But there are many conflicting 'absolutely essential requirements'.
For some a Boost licence is essential, for others using the definitive but limited license GMP bignum is fine.
For some 256 bits would be useful, for others they must be infinitely expandable.
For some if it gets the right answer, time is unimportant - for others speed is paramount Isn't something some generic programming can solve by either using
Paul A. Bristow wrote: policies or specialization based on operator selection ?
Indeed - another worm in the can, or several ;-) But it would be worth doing - if done well enough. Paul --- Paul A. Bristow Prizet Farmhouse Kendal, UK LA8 8AB +44 1539 561830, mobile +44 7714330204 pbristow@hetp.u-net.com

Isn't soemthing some generic programming can solve by either using policies or specialization absed on oeprator selection ?
Maybe yes, maybe no. I personal belief is that this particular approach won't result in a very good library or data structure. I think that there are actually several projects here. One is to implement a bigint from scratch, another is to wrap a different bigint (e.g., gmp). The idea is to produce a variety of integer classes that satisfy different requirements, but not cram them into a single class and/or specializations. A third project might to develop a generic library that encompasses them all. If you provide wrappers for 4 bigint classes, what concepts describe their interfaces? If you end up proposing a bigint class (or two), be specific about your goals. Don't try to be overly general. You won't be able to solve everybody's needs. Andrew Sutton andrew.n.sutton@gmail.com

Andrew Sutton wrote:
Maybe yes, maybe no. I personal belief is that this particular approach won't result in a very good library or data structure.
well, my idea was more around ahving a Integer interface that rely on a Representation concept that can be either made from scratch or refined form exising code. It has the advantage to specify a clear interface will letting implementation dependant detail hidden from the user. Now, with a proper concept specification, it should be doable to get a proper "cross-project" adaptor. my 0.02€ anyway ;)

For some if it gets the right answer, time is unimportant - for others speed is paramount.
You should search through the archives for at least the following to see what a minefield it is!
bigint Big integer library by Richard Peters
mp_int by Kevin Sopp
Introduction of numeric_adaptor - switching the underlying mechanism.
Arbitrary precision arithmetic
[mp_math] a multi precision signed integer library
Using NTL and MPFR
Many of the problems are also in testing and documentation to get something that is good enough to review, revise, and revise and get accepted during the GSoC period.
(...)
PS Of course there is also a need for floating point ;-) But this is an even bigger can of worms!
To add a relatively new one, and currently my favorite: http://www.ttmath.org/ttmath Having the BSD license, being template based and header only, supporting integer and floating point, its precision can be specified by template, this one would IMO fit into Boost. Regards, Barend

Kamil Witecki wrote:
Hello all, I'd like to propose new library for boost - a Big Integer library. Boost has plenty of applications build upon it and some of them has to use integers greater that those ensured by C++ standard. What is more some of them needs even Pythonlike "unbounded" integers. What I am proposing is library implementing cross-platform library supporting such integers working as standard arithmetic type.
Is it a good proposal for GSoC project and who would you recommend as a possible mentor for such project?
I'd like to point Bruno's numeric_adaptor proposal http://lists.boost.org/Archives/boost/2009/11/157732.php It looks both projects would overlap to some extent. Best regards, -- Mateusz Loskot, http://mateusz.loskot.net

I'd like to point Bruno's numeric_adaptor proposal
http://lists.boost.org/Archives/boost/2009/11/157732.php
It looks both projects would overlap to some extent.
Actually the initial need was to be able to handle any numbers library (as well as fundamental types obviously) inside Boost.Geometry. The idea will probably be replaced by extending and using Boost.Math bindings. But I think what's proposed here is a real library rather than a wrapper upon existing ones. Bruno
participants (10)
-
Andrew Sutton
-
Barend Gehrels
-
Bruno Lalande
-
Darren Garvey
-
joel falcou
-
Joel Falcou
-
Kamil Witecki
-
Mateusz Loskot
-
Paul A. Bristow
-
Scott McMurray