This file lists projects suitable for volunteers. Please see the tasks file for smaller tasks.
If you want to work on any of the projects below, please let tege@swox.com know. If you want to help with a project that already somebody else is working on, please talk to that person too, tege@swox.com can put you in touch. (There are no email addresses of volunteers below, due to spamming problems.)
A C++ wrapper for GMP is highly desirable. Several people have started writing one, but nobody has so far finished it. For a wrapper to be useful, one needs to pay attention to efficiency.
a += b
by directly applying mpz_add.
The current multiplication code uses Karatsuba, 3-way Toom-Cook, or Fermat FFT. Several new developments are desirable:
Write new and tune existing assembly routines. The programs in mpn/tests and the tune/speed.c program are useful for testing and timing the routines you write. See the README files in those directories for more information.
Please make sure your new routines are fast for these three situations:
The most important routines are mpn_addmul_1, mpn_mul_basecase and mpn_sqr_basecase. The latter two don't exist for all machines, while mpn_addmul_1 exists for almost all machines.
Standard techniques for these routines are unrolling, software pipelining, and specialization for common operand values. For machines with poor integer multiplication, it is often possible to improve the performance using floating-point operations, or SIMD operations such as MMX or Sun's VIS.
Using floating-point operations is interesting but somewhat tricky. Since IEEE double has 53 bit of mantissa, one has to split the operands in small prices, so that no result is greater than 2^53. For 32-bit computers, splitting one operand into 16-bit pieces works. For 64-bit machines, one operand can be split into 21-bit pieces and the other into 32-bit pieces. (A 64-bit operand can be split into just three 21-bit pieces if one allows the split operands to be negative!)
We currently have extended GCD based on Lehmer's method. But the binary method can quite easily be improved for bignums in a similar way Lehmer improved Euclid's algorithm. The result should beat Lehmer's method by about a factor of 2. Furthermore, the multiprecision step of Lehmer's method and the binary method will be identical, so the current code can mostly be reused. It should be possible to share code between GCD and GCDEXT, and probably with Jacobi symbols too.
Implement the functions of math.h for the GMP mpf layer! Check the book "Pi and the AGM" by Borwein and Borwein for ideas how to do this. These functions are desirable: acos, acosh, asin, asinh, atan, atanh, atan2, cos, cosh, exp, log, log10, pow, sin, sinh, tan, tanh.
The current code for computing square roots use a Newton iteration that rely on division. It is possible to avoid using division by computing 1/sqrt(A) using this formula:
2 x = x (3 - A x )/2. i+1 i iThe final result is then computed without division using,
sqrt(A) = A x . nThe resulting code should be substantially faster than the current code.
Implement, at the mpn level, a routine for computing the nth root of a number. The routine should use Newton's method, preferably without using division.
If the routine becomes fast enough, perhaps square roots could be computed using this function.
Implement some more pseudo random number generator algorithms. Today there's only Linear Congruential.
Add a test suite for old bugs. These tests wouldn't loop or use random numbers, but just test for specific bugs found in the past.
More importantly, improve the random number controls for test collections:
With this in place, it should be possible to rid GMP of practically all bugs by having some dedicated GMP test machines running "make check" with ever increasing seeds (and periodically updating to the latest GMP).
If a few more ASSERTs were sprinkled through the code, running some tests with --enable-assert might be useful, though not a substitute for tests on the normal build.
An important feature of any random tests will be to record the seeds used, and perhaps to snapshot operands before performing each test, so any problem exposed can be reproduced.
Please send comments about this page to
tege@swox.com. Copyright (C) 1999, 2000 Torbjörn Granlund. |