diff git a/histogram/histogram.lisp b/histogram/histogram.lisp
index 5a5a98ee630410188de6e538fca390b908ee00f6..b27b521612ca4a243c3898b59be93d27943313a3 100644
 a/histogram/histogram.lisp
+++ b/histogram/histogram.lisp
@@ 1,6 +1,6 @@
;; The histogram structure
;; Liam Healy, Mon Jan 1 2007  11:32
;; Timestamp: <20080914 22:06:19EDT histogram.lisp>
+;; Timestamp: <20081116 13:46:24EST histogram.lisp>
;; $Id$
(inpackage :gsl)
@@ 30,7 +30,7 @@
"Check that a GSL data pointer is not null, then assign it to the object."
(checknullpointer
pointer
 :ENOMEM
+ 'memoryallocationfailure
(format nil "for ~a."
(withoutputtostring (stream) (princ object stream))))
(setf (mpointer object) pointer))
diff git a/init/conditions.lisp b/init/conditions.lisp
index 094735c96dc3180a3b0b7918f6023163d925ce92..a8c8b273e3414340de80bb951f8a88a86329b702 100644
 a/init/conditions.lisp
+++ b/init/conditions.lisp
@@ 1,6 +1,6 @@
;; GSL errors
;; Liam Healy Sat Mar 4 2006  18:33
;; Timestamp: <20081116 13:26:03EST conditions.lisp>
+;; Timestamp: <20081116 14:47:24EST conditions.lisp>
;; $Id$
(inpackage :gsl)
@@ 36,9 +36,9 @@
(defparameter *errornokeyword* nil)
(defmacro definegslcondition (keyword number text)
+(defmacro definegslcondition (keyword number text &rest superclasses)
`(progn
 (definecondition ,keyword (gslcondition)
+ (definecondition ,keyword (gslcondition ,@superclasses)
((errornumber :initform ,number :reader errornumber :allocation :class)
(errortext :initform ,text :reader errortext :allocation :class))
(:documentation
@@ 49,44 +49,58 @@
(export ',keyword)))
(definegslcondition inputdomain 1 "Input domain error")
(definegslcondition ERANGE 2 "Output range error")
(definegslcondition EFAULT 3 "Invalid pointer")
(definegslcondition EINVAL 4 "Invalid argument")
(definegslcondition EFAILED 5 "Generic failure")
(definegslcondition EFACTOR 6 "Factorization failed")
(definegslcondition ESANITY 7 "Sanity check failed  shouldn't happen")
(definegslcondition ENOMEM 8 "Malloc failed")
(definegslcondition EBADFUNC 9 "Problem with usersupplied function")
(definegslcondition ERUNAWAY 10 "Iterative process is out of control")
(definegslcondition EMAXITER 11 "Exceeded max number of iterations")
(definegslcondition EZERODIV 12 "Tried to divide by zero")
(definegslcondition EBADTOL 13 "User specified an invalid tolerance")
(definegslcondition ETOL 14 "Failed to reach the specified tolerance")
(definegslcondition EUNDRFLW 15 "Underflow")
(definegslcondition EOVRFLW 16 "Overflow")
(definegslcondition ELOSS 17 "Loss of accuracy")
(definegslcondition EROUND 18 "Failed because of roundoff error")
(definegslcondition EBADLEN 19 "Matrix, vector lengths are not conformant")
(definegslcondition ENOTSQR 20 "Matrix not square")
(definegslcondition ESING 21 "Apparent singularity detected")
(definegslcondition EDIVERGE 22 "Integral or series is divergent")
(definegslcondition EUNSUP 23 "Requested feature is not supported by the hardware")
(definegslcondition EUNIMPL 24 "Requested feature not (yet) implemented")
(definegslcondition ECACHE 25 "Cache limit exceeded")
(definegslcondition ETABLE 26 "Table limit exceeded")
(definegslcondition ENOPROG 27 "Iteration is not making progress towards solution")
(definegslcondition ENOPROGJ 28 "Jacobian evaluations are not improving the solution")
(definegslcondition ETOLF 29 "Cannot reach the specified tolerance in F")
(definegslcondition ETOLX 30 "Cannot reach the specified tolerance in X")
(definegslcondition ETOLG 31 "Cannot reach the specified tolerance in gradient")
(definegslcondition EOF 32 "End of file")
+(definegslcondition inputrange 2 "Output range error")
+(definegslcondition invalidpointer 3 "Invalid pointer")
+(definegslcondition invalidargument 4 "Invalid argument")
+(definegslcondition genericfailure 5 "Generic failure")
+(definegslcondition factorizationfailure 6 "Factorization failed")
+(definegslcondition sanitycheckfailure
+ 7 "Sanity check failed  shouldn't happen")
+(definegslcondition memoryallocationfailure 8 "Malloc failed")
+(definegslcondition badfunctionsupplied
+ 9 "Problem with usersupplied function")
+(definegslcondition runawayiteration
+ 10 "Iterative process is out of control")
+(definegslcondition exceededmaximumiterations
+ 11 "Exceeded max number of iterations")
+(definegslcondition gsldivisionbyzero
+ 12 "Tried to divide by zero" divisionbyzero)
+(definegslcondition invalidtolerance 13 "User specified an invalid tolerance")
+(definegslcondition failuretoreachtolerance
+ 14 "Failed to reach the specified tolerance")
+(definegslcondition underflow 15 "Underflow")
+(definegslcondition overflow 16 "Overflow")
+(definegslcondition lossofaccuracy 17 "Loss of accuracy")
+(definegslcondition roundofffailure 18 "Failed because of roundoff error")
+(definegslcondition nonconformantdimensions
+ 19 "Matrix, vector lengths are not conformant")
+(definegslcondition nonsquarematrix 20 "Matrix not square")
+(definegslcondition singularity 21 "Apparent singularity detected")
+(definegslcondition divergence 22 "Integral or series is divergent")
+(definegslcondition unsupportedfeature
+ 23 "Requested feature is not supported by the hardware")
+(definegslcondition unimplementedfeature
+ 24 "Requested feature not (yet) implemented")
+(definegslcondition cachelimitexceeded 25 "Cache limit exceeded")
+(definegslcondition tablelimitexceeded 26 "Table limit exceeded")
+(definegslcondition noprogress 27
+ "Iteration is not making progress towards solution")
+(definegslcondition jacobiannotimproving
+ 28 "Jacobian evaluations are not improving the solution")
+(definegslcondition failuretoreachtolerancef
+ 29 "Cannot reach the specified tolerance in F")
+(definegslcondition failuretoreachtolerancex
+ 30 "Cannot reach the specified tolerance in X")
+(definegslcondition failuretoreachtoleranceg
+ 31 "Cannot reach the specified tolerance in gradient")
+(definegslcondition gsleof 32 "End of file" endoffile)
;;; It is possible to return +positiveinfinity+
;;; by defining a handler for :EOVRFLW.
+;;; by defining a handler for 'overflow.
(defun lookupcondition (number)
(or (rest (assoc number *errornokeyword*))
;; go for "Generic failure" of the code doesn't come up
 'EFAILED))
+ 'genericfailure))
(defun signalgslerror (number explanation &optional file line)
"Signal an error from the GSL library."
diff git a/init/defmfun.lisp b/init/defmfun.lisp
index ccb7d325b2b68a5e0780c323383d1787abbf7ab7..e05544602f2303aee4a72020955131a35f3023fb 100644
 a/init/defmfun.lisp
+++ b/init/defmfun.lisp
@@ 1,6 +1,6 @@
;; Macro for defining GSL functions.
;; Liam Healy 20080416 20:49:50EDT defmfun.lisp
;; Timestamp: <20081111 21:37:46EST defmfun.lisp>
+;; Timestamp: <20081116 14:51:48EST defmfun.lisp>
;; $Id$
(inpackage :gsl)
@@ 586,9 +586,10 @@
#native
,@(when outputs `(,(mapcar (lambda (x) `(setf (clinvalid ,x) t))) outputs))
,@(when (or nullpointerinfo (eq creturn :pointer))
 `((checknullpointer ,cretname
 ,@(or nullpointerinfo
 '(:ENOMEM "No memory allocated")))))
+ `((checknullpointer
+ ,cretname
+ ,@(or nullpointerinfo
+ '('memoryallocationfailure "No memory allocated")))))
,@after
(values
,@(defmfunreturn
diff git a/solveminimizefit/minimizationone.lisp b/solveminimizefit/minimizationone.lisp
index bc80028ff7495a8076794dac629d1b3ea7be720a..1c482eb1f51230f8e8495399e6cfd16c0fe8de59 100644
 a/solveminimizefit/minimizationone.lisp
+++ b/solveminimizefit/minimizationone.lisp
@@ 1,6 +1,6 @@
;; Univariate minimization
;; Liam Healy Tue Jan 8 2008  21:02
;; Timestamp: <20080217 18:37:39EST minimizationone.lisp>
+;; Timestamp: <20081116 14:25:08EST minimizationone.lisp>
;; $Id$
(inpackage :gsl)
@@ 72,7 +72,7 @@
:creturn :successcontinue
:documentation ; FDL
"Perform a single iteration of the minimizer. The following
 errors may be signalled: :EBADFUNC,
+ errors may be signalled: 'badfunctionsupplied,
the iteration encountered a singular point where the function or its
derivative evaluated to infinity or NaN, or
:FAILURE, the algorithm could not improve the current best approximation or
diff git a/solveminimizefit/nonlinearleastsquares.lisp b/solveminimizefit/nonlinearleastsquares.lisp
index 366a3722a3939482180ac2427329a9f02ebe3f5d..dcab38ab2036c25a192682e1737ed57d8de908c5 100644
 a/solveminimizefit/nonlinearleastsquares.lisp
+++ b/solveminimizefit/nonlinearleastsquares.lisp
@@ 1,6 +1,6 @@
;; Nonlinear least squares fitting.
;; Liam Healy, 20080209 12:59:16EST nonlinearleastsquares.lisp
;; Timestamp: <20080831 15:13:29EDT nonlinearleastsquares.lisp>
+;; Timestamp: <20081116 14:49:15EST nonlinearleastsquares.lisp>
;; $Id$
(inpackage :gsl)
@@ 256,14 +256,17 @@
the trust region, then the size of the trust region is decreased and
another trial step is computed.
 The algorithm also monitors the progress of the solution and returns an
 error if the changes in the solution are smaller than the machine
 precision. The possible error codes are,
 :ETOLF the decrease in the function falls below machine precision,
 :ETOLX the change in the position vector falls below machine precision,
 :ETOLG the norm of the gradient, relative to the norm of the function,
+ The algorithm also monitors the progress of the solution and
+ returns an error if the changes in the solution are smaller than
+ the machine precision. The possible errors signalled are:
+ 'failuretoreachtolerancef the decrease in the function falls
+ below machine precision,
+ 'failuretoreachtolerancex
+ the change in the position vector falls below machine precision,
+ 'failuretoreachtoleranceg
+ the norm of the gradient, relative to the norm of the function,
falls below machine precision.
 These error codes indicate that further iterations will be unlikely to
+ These errors indicate that further iterations would be unlikely to
change the solution from its current value.")
(defmpar *levenbergmarquardtunscaled* "gsl_multifit_fdfsolver_lmder"
diff git a/solveminimizefit/rootsmulti.lisp b/solveminimizefit/rootsmulti.lisp
index 058772daa8c0f7b7f91f9886c2487e7876c900eb..e91af7be1c3398947d9075ec8475e1c39426a6f0 100644
 a/solveminimizefit/rootsmulti.lisp
+++ b/solveminimizefit/rootsmulti.lisp
@@ 1,6 +1,6 @@
;;; Multivariate roots.
;;; Liam Healy 20080112 12:49:08
;;; Timestamp: <20080823 23:04:50EDT rootsmulti.lisp>
+;;; Timestamp: <20081116 14:44:38EST rootsmulti.lisp>
;;; $Id$
(inpackage :gsl)
@@ 130,23 +130,23 @@
"gsl_multiroot_fsolver_iterate"
((solver :pointer))
:documentation ; FDL
 "Perform a single iteration of the solver. The following
 errors may be signalled: :EBADFUNC,
 the iteration encountered a singular point where the function or its
 derivative evaluated to infinity or NaN, or
 :EZERODIV, the derivative of the function vanished at the iteration point,
 preventing the algorithm from continuing without a division by zero.")
+ "Perform a single iteration of the solver. The following errors may
+ be signalled: 'badfunctionsupplied, the iteration encountered a
+ singular point where the function or its derivative evaluated to
+ infinity or NaN, or 'gsldivisionbyzero, the derivative of the
+ function vanished at the iteration point, preventing the algorithm
+ from continuing without a division by zero.")
(defmfun iteratemfdfsolver (solver)
"gsl_multiroot_fdfsolver_iterate"
((solver :pointer))
:documentation ; FDL
 "Perform a single iteration of the solver. The following
 errors may be signalled: :EBADFUNC,
 the iteration encountered a singular point where the function or its
 derivative evaluated to infinity or NaN, or
 :EZERODIV, the derivative of the function vanished at the iteration point,
 preventing the algorithm from continuing without a division by zero.")
+ "Perform a single iteration of the solver. The following errors may
+ be signalled: 'badfunctionsupplied, the iteration encountered a
+ singular point where the function or its derivative evaluated to
+ infinity or NaN, or 'gsldivisionbyzero, the derivative of the
+ function vanished at the iteration point, preventing the algorithm
+ from continuing without a division by zero.")
(defmfun mfsolverroot (solver)
"gsl_multiroot_fsolver_root"
@@ 285,10 +285,10 @@
attempts fail to reduce the residual then the full Jacobian is
recomputed. The algorithm also monitors the progress of the solution
and returns an error if several steps fail to make any improvement,
 :ENOPROG
+ 'noprogress
the iteration is not making any progress, preventing the algorithm from
continuing.
 :ENOPROGJ
+ 'jacobiannotimproving
reevaluations of the Jacobian indicate that the iteration is not
making any progress, preventing the algorithm from continuing.")
diff git a/solveminimizefit/rootsone.lisp b/solveminimizefit/rootsone.lisp
index 6886d4fce80275916af5174bd686fbf0a0848797..63b883f83f98aa2461e7a475007ba3f677e8caf4 100644
 a/solveminimizefit/rootsone.lisp
+++ b/solveminimizefit/rootsone.lisp
@@ 1,6 +1,6 @@
;; Onedimensional root solver.
;; Liam Healy
;; Timestamp: <20080217 18:13:47EST rootsone.lisp>
+;; Timestamp: <20081116 14:34:13EST rootsone.lisp>
;; $Id$
(inpackage :gsl)
@@ 126,23 +126,23 @@
"gsl_root_fsolver_iterate"
((solver :pointer))
:documentation ; FDL
 "Perform a single iteration of the solver. The following
 errors may be signalled: :EBADFUNC,
 the iteration encountered a singular point where the function or its
 derivative evaluated to infinity or NaN, or
 :EZERODIV, the derivative of the function vanished at the iteration point,
 preventing the algorithm from continuing without a division by zero.")
+ "Perform a single iteration of the solver. The following errors may
+ be signalled: 'badfunctionsupplied, the iteration encountered a
+ singular point where the function or its derivative evaluated to
+ infinity or NaN, or 'gsldivisionbyzero, the derivative of the
+ function vanished at the iteration point, preventing the algorithm
+ from continuing without a division by zero.")
(defmfun iteratefdfsolver (solver)
"gsl_root_fdfsolver_iterate"
((solver :pointer))
:documentation ; FDL
 "Perform a single iteration of the solver. The following
 errors may be signalled: :EBADFUNC,
 the iteration encountered a singular point where the function or its
 derivative evaluated to infinity or NaN, or
 :EZERODIV, the derivative of the function vanished at the iteration point,
 preventing the algorithm from continuing without a division by zero.")
+ "Perform a single iteration of the solver. The following errors may
+ be signalled: 'badfunctionsupplied, the iteration encountered a
+ singular point where the function or its derivative evaluated to
+ infinity or NaN, or 'gsldivisionbyzero, the derivative of the
+ function vanished at the iteration point, preventing the algorithm
+ from continuing without a division by zero.")
(defmfun fsolverroot (solver)
"gsl_root_fsolver_root"
diff git a/specialfunctions/coulomb.lisp b/specialfunctions/coulomb.lisp
index c87784f17edd9bbec88d83dc6f89afc6fac202b9..5001b60068aeac214ef906c07fc3cda4061f8d71 100644
 a/specialfunctions/coulomb.lisp
+++ b/specialfunctions/coulomb.lisp
@@ 1,6 +1,6 @@
;; Coulumb functions
;; Liam Healy, Sat Mar 18 2006  23:23
;; Timestamp: <20081021 22:46:00EDT coulomb.lisp>
+;; Timestamp: <20081116 14:39:08EST coulomb.lisp>
;; $Id$
(inpackage :gsl)
@@ 29,8 +29,6 @@
;;;; Coulomb Wave Functions
;;;;****************************************************************************
;;; Comments are direct from GSL and aren't lispized yet.

(defmfun coulombwaveFG (eta x LF k)
"gsl_sf_coulomb_wave_FG_e"
((eta :double) (x :double) (LF :double) (k :int)
@@ 42,14 +40,13 @@
(err F) (err Fp) (err G) (err Gp))
:documentation ; FDL
"The Coulomb wave functions F_L(\eta,x),
 G_{Lk}(\eta,x) and their derivatives F'_L(\eta,x),
 G'_{Lk}(\eta,x) with respect to x. The parameters are restricted to
 L, Lk > 1/2}, x > 0 and integer k. Note that L
 itself is not restricted to being an integer. The results are stored in
 the parameters F, G for the function values and Fp,
 Gp for the derivative values. If an overflow occurs,
 :EOVRFLW is signalled and scaling exponents are stored in
 the modifiable parameters expF, expG.")
+ G_{Lk}(\eta,x) and their derivatives F'_L(\eta,x), G'_{Lk}(\eta,x)
+ with respect to x. The parameters are restricted to L, Lk > 1/2},
+ x > 0 and integer k. Note that L itself is not restricted to being
+ an integer. The results are stored in the parameters F, G for the
+ function values and Fp, Gp for the derivative values. If an
+ overflow occurs, the condition 'overflow is signalled and scaling
+ exponents are stored in the modifiable parameters expF, expG.")
(defmfun coulombwaveFarray (Lmin eta x fcarray)
"gsl_sf_coulomb_wave_F_array"
diff git a/specialfunctions/hypergeometric.lisp b/specialfunctions/hypergeometric.lisp
index bda87c05a42c0480693f9e7f2e6fe39a3964cf69..864d97da5b6b588f0bae1058c3f58b7e8786d035 100644
 a/specialfunctions/hypergeometric.lisp
+++ b/specialfunctions/hypergeometric.lisp
@@ 1,6 +1,6 @@
;; Hypergeometric function
;; Liam Healy, Fri Apr 28 2006  23:00
;; Timestamp: <20081023 23:11:41EDT hypergeometric.lisp>
+;; Timestamp: <20081116 14:27:48EST hypergeometric.lisp>
;; $Id$
(inpackage :gsl)
@@ 75,7 +75,7 @@
"The Gauss hypergeometric function
2F1(a,b,c,x) for x < 1. If the arguments
(a,b,c,x) are too close to a singularity then the function can
 return the error code :EMAXITER when the series
+ signal the error 'exceededmaximumiterations when the series
approximation converges too slowly. This occurs in the region of
x=1, c  a  b = m for integer m.")
diff git a/specialfunctions/legendre.lisp b/specialfunctions/legendre.lisp
index ed2f3d5c616b58ea673cab4154fb7523b22aac76..8cd252e8fdab1bc8ecd8893fcf92deb1b95c01da 100644
 a/specialfunctions/legendre.lisp
+++ b/specialfunctions/legendre.lisp
@@ 1,6 +1,6 @@
;; Legendre functions
;; Liam Healy, Sat Apr 29 2006  19:16
;; Timestamp: <20081025 11:02:54EDT legendre.lisp>
+;; Timestamp: <20081116 14:39:40EST legendre.lisp>
;; $Id$
(inpackage :gsl)
@@ 78,7 +78,7 @@
;;; l and can overflow for l larger than about 150. There is
;;; no trouble for small m, but overflow occurs when m and
;;; l are both large. Rather than allow overflows, these functions
;;; refuse to calculate P_l^m(x) and return :EOVRFLW when
+;;; refuse to calculate P_l^m(x) and signal 'overflow when
;;; they can sense that l and m are too big.
;;; If you want to calculate a spherical harmonic, then do not use
diff git a/tests/numericalintegration.lisp b/tests/numericalintegration.lisp
index 1ed86047d320a0833391ab1a238b7a43428a0ab1..ad310d8fc797a017b94316c8dec878a7463c6d14 100644
 a/tests/numericalintegration.lisp
+++ b/tests/numericalintegration.lisp
@@ 13,7 +13,7 @@
(LETM ((WS (INTEGRATIONWORKSPACE 20)))
(INTEGRATIONQAG ONESINE 0.0d0 PI :GAUSS15 20
WS))))
 (LISPUNIT:ASSERTERROR 'EINVAL
+ (LISPUNIT:ASSERTERROR 'invalidargument
(LETM
((WS
(INTEGRATIONWORKSPACE 20)))
diff git a/wavelet.lisp b/wavelet.lisp
index 0e5d2823f17bbc4f9c38e8aa02770a8e59a83360..98f3373fff67e783ff46ea8ce8f4d9c0f1c95cf4 100644
 a/wavelet.lisp
+++ b/wavelet.lisp
@@ 1,6 +1,6 @@
;; Wavelet transforms.
;; Liam Healy, Mon Nov 26 2007  20:43
;; Timestamp: <20080823 11:45:54EDT wavelet.lisp>
+;; Timestamp: <20081116 13:46:02EST wavelet.lisp>
;; $Id$
(inpackage :gsl)
@@ 29,10 +29,10 @@
:export nil
:index (letm wavelet)
:documentation ; FDL
 "Allocate and initialize a wavelet object of type
 'type. The parameter 'member selects the specific member of the
 wavelet family. An error of :ENOMEM indicates either lack
 of memory or an unsupported member requested.")
+ "Allocate and initialize a wavelet object of type 'type. The
+ parameter 'member selects the specific member of the wavelet
+ family. A memoryallocationfailure error indicates either
+ lack of memory or an unsupported member requested.")
(defmfun freewavelet (wavelet)
"gsl_wavelet_free"
@@ 203,7 +203,7 @@
workspace of the appropriate size must be provided. On exit,
the appropriate elements of the array data are replaced by their
twodimensional wavelet transform.
 An error :EINVAL is signalled if the matrix is not square
+ An error invalidargument is signalled if the matrix is not square
with dimension a power of 2, or if insufficient
workspace is provided.")
@@ 221,7 +221,7 @@
workspace of the appropriate size must be provided. On exit,
the appropriate elements of the array data are replaced by their
twodimensional wavelet transform.
 An error :EINVAL is signalled if the matrix is not square
+ An error invalidargument is signalled if the matrix is not square
with dimension a power of 2, or if insufficient
workspace is provided.")
@@ 238,7 +238,7 @@
and are restricted to powers of two. A workspace of the appropriate
size must be provided. On exit, the appropriate elements of the array
data are replaced by their twodimensional wavelet transform. An
 error :EINVAL is signalled if the matrix is not square with dimension
+ error invalidargument is signalled if the matrix is not square with dimension
a power of 2, or if insufficient workspace is provided.")
(defmfun wavelet2dtransformmatrix (wavelet data direction workspace)