Mail Archives: djgpp/1998/01/14/08:00:29
Paul Derbyshire wrote:
>
> I appear to have lost the URL for the GMP library. (But I did manage to
> snag tar and gzip.)
My 'port' of it to work with DJGPP is at
http://www.keris.demon.co.uk/bin/gmp202.zip
> What was it again? Also, is there a C++ multiprecision library, or a C++
> wrapper/version of gmp, or do I have to write my own? (If so, and I copy
> parts of GMP, I assume it becomes LGPL?)
I tried writing a wrapper, but it gets hideously slow (assuming that
you want to use ordinary operators like + and -) because when allocating
temporaries it keeps doing malloc/free.
I've written a (non-GPL) set of routines using a fixed length. Only
integer at present, although I do intend to extend them to fixed and
floating point in the future. They have C++ wrappers with all standard
arithmetic functions (bit operations are not there) including shifts.
If you want them, my C/C++ library source is at
http://www.keris.demon.co.uk/bin/xlib.zip
There are several other things in there as well, almost all still
under development (and therefore likely to change in future versions
of the library, some drastically).
It has some documentation, mainly (where it's there at all) as man
pages (but it should include text versions as well for them), but
not yet for the MP stuff.
(It should have size 63287 and timestamp Jan 14 12:42 - if earlier the
cache hasn't been updated yet so try again.)
Alternatively email me and I'll send you mparith.h and .c, the MP
arithmetic part of it.
Chris C
- Raw text -