This file lists in no particular order the things that ought to be
implemented / fixed. It is hopelessly incomplete right now, but it's a
start. Most items require major work, and may not be that desireable after
all. If you intend to work on any of these things, drop an email to
pari-dev first.

***************************  DOCUMENTATION    ****************************

0) give ratings to each TODO item (difficulty / interest)

1) add examples for all functions in Chapter 3

2) complete/update the tutorial

3) clean up gphelp / TeX macros

4) HTML version (pod ? SGML ? yodl ???)

5) Separate chapter 4 and 5 and document the innards of PARI


***************************   BUGS            ****************************

1) silent overflows in codeword-handling macros: O(2^50000) --> O(2^-15535)

2) gcmp is not transitive: [] == 0, [0] == 0, but [0] != []

3) some doubles can overflow in rootpol.c, should use t_REAL everywhere
  ? ellinit([0,2^1024,0,0,1])
    ***   underflow or overflow in a R->dbl conversion

4) after allocatemem() / default(parisize, ...), the rest of the command is
discarded (ends by a longjmp).

***************************   DEVELOPMENT     ****************************

1) switch to autoconf

2) write decent (highly specialized) benches

3) put everything under CVS and open a public server


***************************   ALGORITHMS      ****************************

Kernel:
=======
0) benchmark / profile basic functions and see what needs to be done

1) finish t_REAL Karatsuba and diviiexact

2) add inline level0 routines that operate on _limbs_, not on longs.

3) FFT for basic types and polynomials (say in A[X], for A = Z, F_q, ...)

4) add support for different multiprecision kernels (a la LiDIA)


Misc:
=====
1) decent finite field package (remove all the nfxxxmodpr functions)

2) round 4 (too slow, use modular techniques)

3) 2-adic initell

4) rnfkummer (doesn't work)

5) nfsubfields [use known subfields to discard blocs right away] (current use
far too much memory)

6) have quadclassunit return bnf structure

7) LLL over R (not stable). Clean up the file (remove duplicate code)

8) rethink the element_mul type of functions: multiplication table is O(n^3),
polynomial multiplication + remainder is O(n^2) [+ can use Karatsuba/FFT]

9) modify invmod to get Jebelean extended gcd


***************************   LIBRARY DESIGN   ****************************

1) allow generic functions to process and produce t_SMALL's

2) rewrite the generic functions (gadd/gmul/gdiv plus a couple of others) to
use (two-dimensional) table lookups instead of switches

3) remove all dependences on types ordering [if (typ(x) < t_POL) ...]

4) introduce "special" types for objects which are really containers and
should be defined by a secondary type (e.g number fields, finite fields,
p-adic fields, elliptic curves, ...). Would keep list of types small (and fast)

5) better representations for multivariate polynomials

6) find a way to deal (generically) with "integral object + its content"
(instead of e.g. polynomial in Q[X] as of now)

7) type "element in" ([number|finite] field...), "point" on elliptic curve

8) "mute" variables for t_POLMOD. Should have Mod(x,x^2+1) == Mod(y,y^2+1).
Maybe useless once 7) gets implemented

9) rename library functions following GP names

10) have some header magic (transparently) prepend some prefix (e.g "pari_")
before all exported functions to prevent name conflicts. Build alias files
for debuggers


***************************   GP DESIGN       ****************************

1) split matrix_block in 2 parts: exploration + assignment. Would allow
Math::Pari to use complicated x[][][][] constructs

2) changevar with explicit (incomplete) permutation. E.g
changevar(p, [x,y], [a,b]) for x -> a, y -> b
add a flag to substitute in succession or in parallel (e.g if a involves y)

3) add #defines in gp.c to turn it into a gp-to-C compiler

4) possibility to save and load a session (variables, functions, defaults)

5) some mechanism to trap exceptions. E.g. trap(errpile, save_session())

6) remove global analyseurtetpil and use gerepileupto in anal.c (Pb: installed
functions need to create root before components; not backward compatible)

7) use divide & conquer approach in constante() (convert string -> integer)
