list of large integer arithmetic packages this is the file bignums txt from ripem msu edu last updated april in response to email requests i have assembled this list of large integer arithmetic packages of which i have heard most of these are c function libraries available in source form for your convenience i have placed copies of some of these on ripem msu edu they are available for anonymous ftp in the directory pub bignum however what i have may not be the most current version in all cases here they are in no particular order mp multiple precision package that comes with some unixes multiple precision package accessed via lmp flag on your compiler provides gcd exponentiation sqrt comes with sunos next mach bbn mach and probably a few others see man mp object code only of course pari henri cohen et al universite bordeaux i paris france multiple precision desk calculator and library routines contains optimized assembly code for motorola semi optimized code for sparc and apparently rather slow generic c version does both integers and reals does vectors and matrices as well as scalars contains a number of advanced functions some of which i ve never heard of weber s function has a factorization function primality test other related stuff plenty of tex documentation public domain but you can t distribute modified versions available via anonymous ftp from math ucla edu there seem to be mac and next specific versions there in addition to filename pari a tar z arithmetic in global fields arith kevin r coombes david r grant package of routines for arbitrary precision integers or polynomials over finite fields includes basic and a few others like gcd source code in c distributed under the terms of the gnu public license includes man pages and tex documentation filename arith tar z arbitrary precision math library lloyd zusman los gatos ca c package which supports basic provides for radix points i e non integers not as polished as the others here posted to comp sources misc in october filename apml tar z bignum j vuillemin inria france and others distributed by digital equipment paris research lab decprl a portable and efficient arbitrary precision integer package c code with generic c kernel plus assembly kernels for mc x intel i mips ns pyramid and of course vax this is probably one of the better known packages of this type implements mod plus logical operations or and xor both signed and unsigned arithmetic available available via email from librarian decprl dec com you will receive shell archives give your postal address and you will also receive printed documentation from france package includes tex documentation publicly available for non commercial use i removed this from my archive when i heard a rumor that prl doesn t like others to distribute it however bignum is distributed as part of ecpp see below lenstra s package arjen lenstra bellcore portable unsigned integer package written entirely in c includes exponentiation mod primality testing sqrt random number generator and a few others the package was uncommented and undocumented i have tried to add enough comments to get by this is the only of these packages that i have actually used it works well and is very portable i haven t done any benchmarks against the others but the code looks clever lenstra is an accomplished number theorist unlike the other packages here this one requires you to allocate storage statically only a problem if your numbers are really huge arjen has placed the code in the public domain filename lenstra tar z lenstra arjen lenstra bellcore an improved version of arjen s package above this one does signed arithmetic and dynamic allocation which can be turned off as an option has a few new routines too lenstra contains minor bugfixes to the previously available lenstra and lenstra filename lenstra c bmp brent s multiple precision r p brent vintage fortran code to do extended precision floating fixed point arithmetic includes most of the mathematical functions you d find in a fortran run time library this code is an acm algorithm number to obtain send a mail message to netlib ornl gov containing the line send mp f from bmp or better yet perhaps just start with help spx kannan alagappan joseph tardo dec this is a huge prototype public key authentication system based on rsa i mention it here because those who have heard of spx have probably correctly guessed that it contains a large integer package and i want to inform you that the large integer package it contains is indeed dec s bignum from france you can get a beta test copy of spx from crl dec com use it only for testing as it may expire on a certain date i don t know whether this has expired yet amp antti s multiple precision antti louko alo kampi hut fi multiple precision integer package in c includes pow mod x mod y random sqrt gcd available for non commercial use the package includes share secret a public key system based on the diffie hellman algorithm this is normally part of the well known des dist tar z but i have removed the des part to avoid having to deal with cryptographic export laws and have named the result filename amp tar z gennum per bothner u of wisconsin madison c routines and classes to do generic arithmetic both integer and rational formerly available on sevenlayer cs wis edu however it seems to have disappeared sorry miracl by someone in dublin ireland integer and fractional multiple precision package includes factorization primality testing encryption not public domain apparently it is available from the austin code works see ads in byte magazine or dr dobbs precision dave barrett barrettd tigger colorado edu multiple precision integer package in c with sqrt rand mod pow log simple vector support does dynamic allocation of memory free as long as you don t sell it or any program that uses it filename precision tar z ubasic prof yuji kida rikkyo university nishi ikebukuro tokyo japan kida rkmath rikkyo ac jp multiple precision version of the basic programming language for ms dos includes floating point said by keith briggs to be pretty fast object only i think ervin morekypr bitnet says this is the best package that i know of for fast arithmetic has a version optimized for machines includes routines to do mpqs the fastest currently known general factoring algorithm an additional file is at both sites to allow mpqs to use hard drives so that it can factor up to digits many number theoretical functions are included in ubasic it allows over digits of precision available via anonymous ftp from shape mps ohio state edu or simtel army mil or wuarchive wustl edu calc v unknown ms dos c like language that allows infinite precision nice intrinsic functions ervin morekypr bitnet reports problems when changing precision on the fly see simtel or wuarchive briggs arith keith briggs kbriggs mundoe maths mu oz au turbo pascal source for routines that do multiple precision sqrt gcd factoring rand for integers also includes and rand for rational numbers filename briggs arith pas institute fur experimentelle mathematik dr gerhard schneider fast c multiple precision subroutine library i don t know anything about it sl ely cl cam ac uk says to contact mat de hrz a bitnet for more info postal address institute fur experimentelle mathematik ellernstr d essen germany longint markus mueller mueller komsys tik ethz ch multi precision arithmetic written in modula with the most time critical parts written in assembler includes basic arithmetics as well as arithmetics modulo a number an additional module provides a collection of procedures for primality testing gcd multiplicative inverse and more the package is part of a privacy enhanced mail pem package which includes a pem mailer rsa key generator and certificate generation tools source is in modula c and assembler for sun longint has also been ported to ms dos under logitech modula and turbo assembler availability free for university use research and education otherwise a source license is required to obtain write or email to markus mueller bertastrasse ch dietikon switzerland email mueller komsys tik ethz ch bignum henrik johansson nexus comm se bignum package written in portable c will in the future conform to the common lisp functions that handles integers currently includes exponentiation exptmod comparison random numbers and gcd filename bignum gnu multiple precision gnu free software foundation multiple precision package i haven t looked at it yet this is current as of april but there may be a more recent version by the time you read this this package is very widely available on ftp sites filename gmp tar z elliptic curve primality proving francois morian france large package to prove the primality of any prime includes inria s bignum package obtained from ftp inria fr filename ecpp v tar z pgp pretty good privacy philip zimmermann prz sage cgd ucar edu intel based crypto package that includes bignum routines in c said to be quite fast for intel processors unix and mac versions also available the crypto package violates rsa patents but the bignum routines can be used without fear of legal repercussions bell s arbitrary precision calculator david i bell australia dbell pdact pd necisa oz au arbitrary precision calculator with good online help c like language many builtin functions support for integers rational numbers they work like floating point complex numbers matrices strings lists files objects includes gcd primality testing even trig functions recommended large package though obtained from comp sources unix filename calc tar z built in support in other languages various multiple precision arithmetic is available in a number of programming languages such as lisp and abc cf mcsun eu net perl by larry wall available from devvax jpl nasa gov includes source in perl for such a package but it s probably not suitable for serious use for some of these source code may be available this list is long enough so i m not going to pursue it aggressively thanks to ed vielmetti and several others who contributed to this list mark riordan mrr ripem msu edu
