Introduction
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.
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.
Examples
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)
debugger invoked on a GSL-ERROR in thread #:
Input domain error (EDOM), |m| > 1.0 in elljac.c at line 46
Requirements and Platforms
GSLL should work in
any Common Lisp implementation and platform combination
that has CFFI
with callbacks and defcfun 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.
Downloads
You may browse or download the Subversion
repository at
svn://common-lisp.net/project/gsll/svn/trunk. For
example,
svn list svn://common-lisp.net/project/gsll/svn/trunk
svn checkout svn://common-lisp.net/project/gsll/svn/trunk gsll
Additional information
- A documentation guide is
available.
- The development process is described
separately for those interested, and a Trac page is used to
track it and for bug reports (file a "New Ticket").
- There is a mailing
list for all aspects of this project.
Similar or related projects from others
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.