# -*- org -*-
#+TITLE: GSL TODO File

* Main Todo Items

We are looking for volunteers to do the following tasks.
Consult the TODO files in each directory first for specific
requirements.

** Document LQ linalg functions
** 1st-line support on the mailing lists (e.g. checking that bugs are
reproducible, and that all relevant information is supplied)

** Modified Ei(x) function (see specfunc/TODO)

** Quasi-random number distributions 

** ODE algorithms from RKSUITE

** Incomplete Fermi-Dirac functions

** Spheroidal wave functions

** Weierstrass elliptic functions

** Complex Bessel Functions

** Additional volunteers with access to a good library to get copies of
papers for other developers.

** Estimates of condition numbers for linear solvers

** Sine and Cosine Transforms from FFTPACK  (Alok Singhal <as8ca@virginia.edu>)

** Cubature, e.g as provided by Cubpack. (Gert Van den Eynde
<gvdeynde@sckcen.be> ?)

** Fresnel Integrals ("Juergen J. Zach" <jjzach@pacific.mps.ohio-state.edu>)

** Cumulative Distribution functions for discrete random distributions

* Changes for Release 2.0

Break binary compatibility, but keep source compatibility.

** Add a 'void *' to all workspaces, to allow for future changes.

** Disable deprecated functions

** Fix up the workspace_alloc functions so they have consistent names
  (add functions where needed, don't remove)

** Standardize function names, in particular VERB vs NOUN (e.g. _invert
vs _inverse). Also adopt a convection for functions which can operate
in place vs use of workspace (e.g linalg_solve functions).

** gsl_roots doesn't store function value, so testing the residual requires function to be recomputed
Generally all the iterative routines should follow a consistent approach
to outputting everything that is necessary for the next iteration 

** gsl_roots - consider having two returns from solvers - GSL_SUCCESS
if a root has been found or GSL_CONTINUE if further iterations may
be needed.

** mathieu functions - bring functional interfaces into line with GSL
conventions for special functions.

** rewriting the spherical Bessel routines (there are
around 3 separate bug reports for these)

** the nonlinear least squares Levenberg-Marquardt solver should be 
rewritten from scratch - the current version is filled with goto 
statements, and while its supposed to be based on MINPACK, I've found 
numerous examples where GSL fails to converge when MINPACK succeeds, so 
something was not implemented correctly.

** import 2D interpolation code; 3d or nd linear interpolation?

* Other tasks

** Remove use of long double internally, e.g. as an accumulator in
loops. It introduces variation between platforms which is undesirable.
It should be replaced with a preprocessor variable ACC_DOUBLE so
that the user can compile the library with the old long double
behavior if desired.

** Use BLAS internally as much as possible, to take advantage of 
speed improvements on large-scale systems.  There may be some
instances where a simple for() loop is preferred since there's a
function-call overhead in calling BLAS routines.

** More tests. We should (at least) have a test for every error
condition.  Use GCOV to improve coverage.

** Annotate the header files with GAMS classifications.  See if they
can be included in the GAMs website.

** Make the return value EINVAL vs EDOM consistent for invalid
parameters. EDOM means a domain error (i.e. float or mathematically
undefined), EINVAL means invalid (i.e. zero length)

** Change return 0 to return GSL_SUCCESS, and return -1 to GSL_FAILURE
throughout, where appropriate. Similarly change any if(...) checks of
return values to use == GSL_SUCCESS, if they are checking for zero.
N.B. want to be careful about accidentally omitting error conditions
if using something like == GSL_FAILURE when function returns a
different error code.

** Make sure that all #defines are fully wrapped in ()'s, especially
the outermost layer which may have been missed. Everything should be
of the form #define foo(x) (....) so there is no possibility of bad
parsing.  Need a perl script to check this!

** Eliminate use of volatile where it has been used to force rounding
(integration/). It is better to write the code to avoid dependence on
rounding.

** Constant objects (like gsl_roots_fsolver_brent) ought to have
constant pointers (const gsl_roots_fsolver_type * const
gsl_roots_fsolver_brent)

** PyGSL -- python bindings for GSL, see http://pygsl.sf.net/


** From Goose
        ASCII import
        Categorical Sets
        Kernel Density Estimation
        Shampine Polynomial Regression
        Bootstrapping, Jacknife
        Descriptive: Range, Trimmed Mean, Winsorized Mean, Moments
                Harmonic mean, RMS, Durbin-Watson, AR1 independence
                Autocorr, Autocorr_z, Cramer vos Mises, Anderson-Darling
                Spearman-rho, Kendall-tau, EDF_D_both EDF_D_plus,
                EDF_D_minus, EDF_D, EDF_kuiper_V, pooled mean
                pooled var, 
        Tests: kolmogorov_smirnov
        Moving average, Exponential moving average
        wilcoxon_statistic, wilcoxon_noties_cdf, wilcoxon_general_cdf
        Cochran Q test, KruskalWallis, McNemar, spearman_Rocc
        

* Wishlist or vague ideas

** An example chapter on how to link GSL code with GNU Guile, and Python

We could also provide g-wrap wrappers for guile, or swig.i files and
swig demos so that swig can be run more easily.

** Provide an interface to LAPACK, as for BLAS?  Clarify the license
for LAPACK first, their web page is vague on what the license terms
are.  Some parts of LAPACK are included in octave so maybe the Octave
maintainers will know more.

** Public domain or free texts which could be distributed with GSL:
     
Abramowitz and Stegun, "Handbook of Mathematical Functions" appears to
be public domain.

SEPT/02: See online images at http://members.fortunecity.com/aands/

Devroye's book on Random Variates (1st ed) is/was in the public
domain.  


** Investigate complex support in GCC: Operations like sin(z) silently
convert argument to double, losing the imaginary part. This is
mentioned in CEPHES documentation in 1998 with a patch to generate a
warning.  What happened? (Does it now work with gcc-3.0?)

** Go through the matrix and vector functions systematically and decide
what should be provided outside of BLAS.

** Change from gsl-ref.texi to gsl.texi since it is the main file?
Also, put under dir section "Math" (which seems to be the appropriate
one for Debian, as Octave, Gnuplot etc are in that)

** Remove error stream stuff?? It is hardly used.

** Extend histogram routines as described in recent discussion

** Check that there are no conflicts when linking with Lapack. CBLAS, ATLAS

** Make a sorted datatype for the median and quantile functions so that
the user can be prevented from passing unsorted data, which is not
checked for.

** Optimization/error for dest == src as appropriate

** Provide a run-time expression evaluator for interactive programs
where the user can provide formulas as strings.  Keith Briggs
recommended formulc2.22 which he had found useful in several projects.
http://www.cs.brandeis.edu/~hhelf/formu/formulc.html. It is LGPL.
Alternatively, the source code for GDB contains yacc grammars and
evaluators for expressions in various languages, so that would be
another way to go.  It would have the advantage of following the
language standards.  If I was going to write something from scratch I
would think about using that as a base, as the full set of operators
are already included with the correct precedence rules. Being able to
evaluate C and Fortran expressions could be useful.

** We should have an index mapping type object which handles elements
of size_t for vectors and matrices, or at least vectors and matrices
of size_t in addition to long, int, etc.



