The GNU Scientific Library for Lisp (GSLL) allows you to use
the GNU Scientific
Library (GSL) from Common Lisp. This library provides a
full range of common mathematical operations useful to
scientific and engineering applications. The design of the GSLL
interface is such that access to most of the GSL library is
possible in a Lisp-natural way; the intent is that the user not
be hampered by the restrictions of the C language in which GSL
has been written. GSLL thus provides interactive use of GSL for
getting quick answers, even for someone not intending
to program in Lisp.
Topics include:
roots of polynomials, special functions, vectors and matrices,
permutations, sorting, BLAS support, linear algebra,
eigensystems, fast Fourier transforms,
quadrature, random numbers, quasi-random sequences,
random distributions, statistics, histograms, N-tuples,
Monte Carlo integration, simulated annealing, differential
equations, interpolation, numerical differentiation,
Chebyshev approximation, series acceleration,
discrete Hankel transforms, root-finding, minimization
least-squares fitting, IEEE floating-point,
discrete wavelet transforms. See documentation on status of
some incomplete topics.
This code should be considered alpha and is still under
development, but it is largely usable
now, with some GSL capability not yet available.
This software is distributed under the LLGPL
and FDL.
See COPYING. There is absolutely no warranty.
The Jacobian elliptic functions sn, cn, and
dn are special functions (Chapter 7):
(jacobian-elliptic-functions 0.2d0 0.81d0)
0.19762082367187703d0
0.9802785369736752d0
0.9840560289645665d0
1.828927267118668d-318
1.4821969375237396d-321
2.023692885365746d-320
which returns the three function values in succession, along
with the estimated errors of each. The functions are defined
only if the second argument m is not greater than 1,
so an error is signalled if this parameter is out of range:
(jacobian-elliptic-functions 0.61802d0 1.5d0)
Input domain error |m| > 1.0 in elljac.c at line 46
[Condition of type EDOM]
GSLL should work in
any Common Lisp implementation and platform combination
that has CFFI
with callbacks and foreign-funcall support. You will need
- GSL
- CFFI
(Note: you will need a version newer than the current version
0.9.2. Use the darcs repository, a newer tarball, or Debian
testing/unstable.)
- ASDF
In Debian unstable or testing,
the following should work:
apt-get install libgsl0ldbl cl-cffi
(asdf is automatically installed with your CL implementation).
Once your CL implementation is running, do
(asdf:operate 'asdf:compile-op :gsll)
or, if using Debian with the
common-lisp-controller, install with
clc-register-user-package
and then within Lisp
(clc:clc-require :gsll)
.
GSLL has been tested with SBCL and CLISP on Debian i386 and amd64.
You may browse or download as follows:
Due to frequent changes, no tarballs are yet available.
A partial automatically-generated interface to GSL is provided in
cl-gsl.
A Matlab-like array syntax and plotting is provided by
NLISP which might work well with
GSLL. Other numerical mathematics software for Lisp may be found
on Clicki.