diff --git a/data/permutation.lisp b/data/permutation.lisp
index 7a18cda55ff452322e66cb9dea174c3f8d279cc8..91b0808d1711b2d5f475547b5462d47641c660b1 100644
--- a/data/permutation.lisp
+++ b/data/permutation.lisp
@@ -1,6 +1,6 @@
 ;; Permutations
 ;; Liam Healy, Sun Mar 26 2006 - 11:51
-;; Time-stamp: <2008-12-06 19:03:50EST permutation.lisp>
+;; Time-stamp: <2008-12-07 18:17:57EST permutation.lisp>
 ;; $Id$
 
 (in-package :gsl)
@@ -50,7 +50,6 @@
   (((mpointer permutation) :pointer))
   :definition :method
   :c-return :void
-  :inputs (permutation)
   :outputs (permutation)
   :return (permutation)
   :documentation			; FDL
@@ -64,6 +63,7 @@
   :definition :method
   :inputs (source)
   :outputs (destination)
+  :return (destination)
   :documentation			; FDL
   "Copy the elements of the permutation source into the
    permutation destination.  The two permutations must have the same size.")
@@ -74,6 +74,7 @@
   :definition :method
   :inputs (p)
   :outputs (p)
+  :return (p)
   :documentation			; FDL
   "Exchanges the ith and jth elements of the permutation p.")
 
@@ -85,6 +86,7 @@
   "gsl_permutation_size"
   (((mpointer p) :pointer))
   :c-return sizet
+  :inputs (p)
   :documentation			; FDL
   "The size of the permutation p.")
 
@@ -92,6 +94,7 @@
   "gsl_permutation_data"
   (((mpointer p) :pointer))
   :c-return :pointer
+  :inputs (p)
   :documentation			; FDL
   "A pointer to the array of elements in the
    permutation p.")
@@ -105,6 +108,7 @@
   (((mpointer permutation) :pointer))
   :definition :method
   :c-return :boolean
+  :inputs (permutation)
   :documentation			; FDL
   "Check that the permutation p is valid.  The n
   elements should contain each of the numbers 0 to n-1 once and only
@@ -117,15 +121,19 @@
 (defmfun permutation-reverse (p)
   "gsl_permutation_reverse"
   (((mpointer p) :pointer))
-  :outputs (p)
   :c-return :void
+  :inputs (p)
+  :outputs (p)
+  :return (p)
   :documentation			; FDL
   "Reverse the order of the elements of the permutation p.")
 
 (defmfun permutation-inverse (inv p)
   "gsl_permutation_inverse"
   (((mpointer inv) :pointer) ((mpointer p) :pointer))
+  :inputs (p)
   :outputs (inv)
+  :return (inv)
   :documentation			; FDL
   "Find the inverse of the permutation p.")
 
@@ -133,7 +141,9 @@
   "gsl_permutation_next"
   (((mpointer p) :pointer))
   :c-return :success-failure
+  :inputs (p)
   :outputs (p)
+  :return (p :c-return)
   :documentation			; FDL
   "Advance the permutation p to the next permutation
    in lexicographic order and return p and T.  If no further
@@ -146,7 +156,9 @@
   "gsl_permutation_prev"
   (((mpointer p) :pointer))
   :c-return :success-failure
+  :inputs (p)
   :outputs (p)
+  :return (p :c-return)
   :documentation			; FDL
   "Step backwards from the permutation p to the
    previous permutation in lexicographic order, returning p and T.
@@ -160,6 +172,9 @@
 (defmfun permute (p data stride n)
   "gsl_permute"
   (((mpointer p) :pointer) (data :pointer) (stride sizet) (n sizet))
+  :inputs (p data)
+  :outputs (data)
+  :return (data)
   :documentation			; FDL
   "Apply the permutation p to the array data of
    size n with stride stride.")
@@ -167,6 +182,9 @@
 (defmfun permute-inverse (p data stride n)
     "gsl_permute_inverse"
   (((mpointer p) :pointer) (data :pointer) (stride sizet) (n sizet))
+  :inputs (p data)
+  :outputs (data)
+  :return (data)
   :documentation			; FDL
   "Apply the inverse of the permutation p to the array data of
    size n with stride.")
@@ -175,7 +193,9 @@
   ("gsl_permute_vector" :type)
   (((mpointer p) :pointer) ((mpointer v) :pointer))
   :definition :generic
+  :inputs (p v)
   :outputs (v)
+  :return (v)
   :documentation			; FDL
   "Apply the permutation p to the elements of the
    vector v considered as a row-vector acted on by a permutation
@@ -188,7 +208,9 @@
   ("gsl_permute_vector" :type "_inverse")
   (((mpointer p) :pointer) ((mpointer v) :pointer))
   :definition :generic
+  :inputs (p v)
   :outputs (v)
+  :return (v)
   :documentation			; FDL
   "Apply the permutation p to the elements of the
    vector v considered as a row-vector acted on by a permutation
@@ -202,7 +224,9 @@
   (((mpointer p) :pointer)
    ((mpointer pa) :pointer)
    ((mpointer pb) :pointer))
+  :inputs (pa pb)
   :outputs (p)
+  :return (p)
   :documentation			; FDL
   "Combine the two permutations pa and pb into a
   single permutation p where p = pa . pb. The permutation
@@ -215,6 +239,7 @@
 (defmfun linear-to-canonical (q p)
   "gsl_permutation_linear_to_canonical"
   (((mpointer q) :pointer) ((mpointer p) :pointer))
+  :inputs (p)
   :outputs (q)
   :documentation			; FDL
   "Compute the canonical form of the permutation p and
@@ -223,6 +248,7 @@
 (defmfun canonical-to-linear (p q)
   "gsl_permutation_canonical_to_linear"
   (((mpointer p) :pointer) ((mpointer q) :pointer))
+  :inputs (q)
   :outputs (p)
   :documentation			; FDL
   "Convert a permutation q in canonical form back into
@@ -231,6 +257,7 @@
 (defmfun inversions (p)
   "gsl_permutation_inversions" (((mpointer p) :pointer))
   :c-return sizet
+  :inputs (p)
   :documentation			; FDL
   "Count the number of inversions in the permutation
   p.  An inversion is any pair of elements that are not in order.
@@ -241,6 +268,7 @@
 (defmfun linear-cycles (p)
   "gsl_permutation_linear_cycles" (((mpointer p) :pointer))
   :c-return sizet
+  :inputs (p)
   :documentation			; FDL
   "Count the number of cycles in the permutation p, given in linear form.")
 
@@ -248,6 +276,7 @@
   "gsl_permutation_canonical_cycles"
   (((mpointer p) :pointer))
   :c-return sizet
+  :inputs (p)
   :documentation			; FDL
   "Count the number of cycles in the permutation q, given in canonical form.")
 
diff --git a/init/defmfun.lisp b/init/defmfun.lisp
index 723a4f8aa8d1797eb1194486c14c7fe985a29ed1..a5c0b587fdbb878c8e97e1497065cec5e22875f7 100644
--- a/init/defmfun.lisp
+++ b/init/defmfun.lisp
@@ -1,6 +1,6 @@
 ;; Macro for defining GSL functions.
 ;; Liam Healy 2008-04-16 20:49:50EDT defmfun.lisp
-;; Time-stamp: <2008-11-29 15:30:45EST defmfun.lisp>
+;; Time-stamp: <2008-12-07 18:18:03EST defmfun.lisp>
 ;; $Id$
 
 (in-package :gsl)
@@ -638,6 +638,7 @@
     (t (unless
 	   (or
 	    (and (eq c-return :error-code)
+		 (not outputs)
 		 (not allocated)
 		 (not return-supplied-p))
 	    (and (null return) return-supplied-p))
diff --git a/linear-algebra/blas1.lisp b/linear-algebra/blas1.lisp
index 22851c8e135821bd5ad729109d8a202fc4cd0ab5..d14948b669bd6ffe7d03ad3e1154256bf0d15c32 100644
--- a/linear-algebra/blas1.lisp
+++ b/linear-algebra/blas1.lisp
@@ -1,6 +1,6 @@
 ;; BLAS level 1, Vector operations
 ;; Liam Healy, Wed Apr 26 2006 - 15:23
-;; Time-stamp: <2008-11-09 17:11:25EST blas1.lisp>
+;; Time-stamp: <2008-12-07 18:24:40EST blas1.lisp>
 ;; $Id$
 
 (in-package :gsl)
@@ -11,6 +11,7 @@
    (result :element-c-type))
   :definition :generic
   :element-types :float-complex
+  :inputs (vec1 vec2)
   :documentation			; FDL
   "Dot, or inner, product between vectors.")
 
@@ -19,6 +20,7 @@
   "gsl_blas_sdsdot"
   ((alpha :float) ((mpointer vec1) :pointer) ((mpointer vec2) :pointer)
    (result :pointer))
+  :inputs (vec1 vec2)
   :outputs (result)
   :documentation			; FDL
   "Sum of a scalar and a dot product for single-floats.")
@@ -87,7 +89,6 @@
   :element-types :float-complex
   :inputs (x)
   :outputs (y)
-  :return (y)
   :documentation			; FDL
   "Copy the elements of the vector x into the vector y.")
 
@@ -100,7 +101,6 @@
   :element-types :float-complex
   :inputs (x y)
   :outputs (y)
-  :return (y)
   :documentation			; FDL
   "Compute the sum y = \alpha x + y for the vectors x and y.")
 
@@ -114,7 +114,6 @@
   :c-return :void
   :inputs (x)
   :outputs (x)
-  :return (x)
   :documentation			; FDL
   "Rescale the vector x by the multiplicative factor alpha.")
 
@@ -126,8 +125,7 @@
   :element-types :complex
   :c-return :void
   :inputs (x)
-  :outputs (x)
-  :return (x))
+  :outputs (x))
 
 ;;; The Givens rotations come in two forms, those that work on bare C
 ;;; arrays, and those that work on GSL vectors.  Ports of both are
@@ -141,7 +139,6 @@
   :element-types :float
   :inputs (x y c s)
   :outputs (x y)
-  :return (x y)
   :documentation			; FDL
   "These functions compute a Givens rotation (c,s) to the vector (x,y),
           [  c  s ] [ x ] = [ r ]
diff --git a/linear-algebra/blas2.lisp b/linear-algebra/blas2.lisp
index 589bdc2292b696319e1212804f133e87972131a3..ed1fe265c03dbf64ed3d7ec6abf081eac4de1f9f 100644
--- a/linear-algebra/blas2.lisp
+++ b/linear-algebra/blas2.lisp
@@ -1,6 +1,6 @@
 ;; BLAS level 2, Matrix-vector operations
 ;; Liam Healy, Wed Apr 26 2006 - 21:08
-;; Time-stamp: <2008-11-09 18:15:43EST blas2.lisp>
+;; Time-stamp: <2008-12-07 18:25:57EST blas2.lisp>
 ;; $Id$
 
 (in-package :gsl)
@@ -36,7 +36,6 @@
   :element-types :float-complex
   :inputs (A x y)
   :outputs (y)
-  :return (y)
   :documentation			; FDL
   "If the second and third arguments are vectors, compute
    the matrix-vector product and sum
@@ -59,7 +58,6 @@
   :element-types :float-complex
   :inputs (A x)
   :outputs (x)
-  :return (x)
   :documentation			; FDL
   "If the second argument is a vector, compute
    the matrix-vector product x =alpha op(A) x
@@ -92,7 +90,6 @@
   :element-types :float-complex
   :inputs (A x)
   :outputs (x)
-  :return (x)
   :documentation			; FDL
    "If the second argument is a vector, compute
    inv(op(A)) x for x, where op(A) = A, A^T, A^H for
@@ -123,7 +120,6 @@
   :element-types :float
   :inputs (A x y)
   :outputs (y)
-  :return (y)
   :documentation			; FDL
   "If the second and third arguments are vectors, compute
   the matrix-vector product and sum y = alpha A
@@ -152,7 +148,6 @@
   :element-types :complex
   :inputs (A x y)
   :outputs (y)
-  :return (y)
   :documentation			; FDL
   "If the second and third arguments are vectors, compute the
   matrix-vector product and sum y = alpha A x + beta y for the
@@ -178,7 +173,6 @@
   :element-types :float-complex
   :inputs (x y A)
   :outputs (A)
-  :return (A)
   :documentation			; FDL
    "The rank-1 update A = alpha x y^T + A of the matrix A.")
 
@@ -190,7 +184,6 @@
   :element-types :complex
   :inputs (x y A)
   :outputs (A)
-  :return (A)
   :documentation			; FDL
   "The conjugate rank-1 update A = alpha x y^H + A of the matrix A.")
 
@@ -204,7 +197,6 @@
   :element-types :float
   :inputs (x A)
   :outputs (A)
-  :return (A)
   :documentation			; FDL
   "If the first argument is a vector,
   the symmetric rank-1 update A = \alpha x x^T + A of the symmetric
@@ -230,7 +222,6 @@
   :element-types :complex
   :inputs (x A)
   :outputs (A)
-  :return (A)
   :documentation			; FDL
   "If the first argument is a vector,
   compute the hermitian rank-1 update A = alpha x x^H + A of the
@@ -259,7 +250,6 @@
   :element-types :float
   :inputs (x y A)
   :outputs (A)
-  :return (A)
   :documentation			; FDL
   "If the first two arguments are vectors, compute
   the symmetric rank-2 update A = alpha x y^T + alpha y x^T + A of the
@@ -285,7 +275,6 @@
   :element-types :complex
   :inputs (x A)
   :outputs (A)
-  :return (A)
   :documentation			; FDL
   "If the first two arguments are vectors, compute the
   hermitian rank-2 update A = alpha x y^H + alpha^* y x^H A of
diff --git a/linear-algebra/blas3.lisp b/linear-algebra/blas3.lisp
index af4c8e03a41e9ae86081bee1b2dd21af9b5182d1..242a16f84fdc93bb42cc4406ceaa1e251a088cd9 100644
--- a/linear-algebra/blas3.lisp
+++ b/linear-algebra/blas3.lisp
@@ -1,6 +1,6 @@
 ;; BLAS level 3, Matrix-matrix operations
 ;; Liam Healy, Wed Apr 26 2006 - 21:08
-;; Time-stamp: <2008-11-09 18:12:05EST blas3.lisp>
+;; Time-stamp: <2008-12-07 18:27:01EST blas3.lisp>
 ;; $Id$
 
 (in-package :gsl)
@@ -27,8 +27,7 @@
   :definition :methods
   :element-types :float-complex
   :inputs (A B C)
-  :outputs (C)
-  :return (C))
+  :outputs (C))
 
 (defmfun matrix-product-symmetric
     ((A matrix) (B matrix) (C matrix)
@@ -40,8 +39,7 @@
   :definition :methods
   :element-types :float-complex
   :inputs (A B C)
-  :outputs (C)
-  :return (C))
+  :outputs (C))
 
 (defmfun matrix-product-hermitian
     ((A matrix) (B matrix) (C matrix)
@@ -55,8 +53,7 @@
   :definition :methods
   :element-types :complex
   :inputs (A B C)
-  :outputs (C)
-  :return (C))
+  :outputs (C))
 
 (defmfun matrix-product-triangular
     ((A matrix) (B matrix)
@@ -69,8 +66,7 @@
   :definition :methods
   :element-types :float-complex
   :inputs (A B)
-  :outputs (B)
-  :return (B))
+  :outputs (B))
 
 (defmfun inverse-matrix-product
     ((A matrix) (B matrix)
@@ -85,8 +81,7 @@
   :definition :methods
   :element-types :float-complex
   :inputs (A B)
-  :outputs (B)
-  :return (B))
+  :outputs (B))
 
 (defmfun symmetric-rank-1-update
     ((A matrix) (C matrix)
@@ -98,8 +93,7 @@
   :definition :methods
   :element-types :float-complex
   :inputs (A C)
-  :outputs (C)
-  :return (C))
+  :outputs (C))
 
 (defmfun hermitian-rank-1-update
     ((A matrix) (C matrix)
@@ -111,8 +105,7 @@
   :definition :methods
   :element-types :complex
   :inputs (A C)
-  :outputs (C)
-  :return (C))
+  :outputs (C))
 
 (defmfun symmetric-rank-2-update
     ((A matrix) (B matrix) (C matrix)
@@ -125,8 +118,7 @@
   :definition :methods
   :element-types :float
   :inputs (A B C)
-  :outputs (C)
-  :return (C))
+  :outputs (C))
 
 (defmfun hermitian-rank-2-update
     ((A matrix) (B matrix) (C matrix)
@@ -139,8 +131,7 @@
   :definition :methods
   :element-types :complex
   :inputs (A B C)
-  :outputs (C)
-  :return (C))
+  :outputs (C))
 
 ;;;;****************************************************************************
 ;;;; Examples and unit test
diff --git a/linear-algebra/cholesky.lisp b/linear-algebra/cholesky.lisp
index 528923a19576f1f2e66ea528c5697593b3b21e96..c5bfedea2e7b3f977364b997b1b2067876fd4d68 100644
--- a/linear-algebra/cholesky.lisp
+++ b/linear-algebra/cholesky.lisp
@@ -1,6 +1,6 @@
 ;; Cholesky Decomposition
 ;; Liam Healy, Wed May  3 2006 - 16:38
-;; Time-stamp: <2008-11-29 15:33:14EST cholesky.lisp>
+;; Time-stamp: <2008-12-07 18:27:20EST cholesky.lisp>
 ;; $Id$
 
 (in-package :gsl)
@@ -21,7 +21,6 @@
   "gsl_linalg_cholesky_decomp" (((mpointer A) :pointer))
   :inputs (A)
   :outputs (A)
-  :return (A)
   :documentation			; FDL
   "Factorize the positive-definite square matrix A
   into the Cholesky decomposition A = L L^T. On output the diagonal
@@ -37,7 +36,6 @@
    ((mpointer x) :pointer))
   :inputs (A b)
   :outputs (x)
-  :return (x)
   :documentation			; FDL
   "Solve the system A x = b using the Cholesky
   decomposition of A into the matrix cholesky given by
@@ -48,7 +46,6 @@
   (((mpointer A) :pointer) ((mpointer x) :pointer))
   :inputs (A x)
   :outputs (x)
-  :return (x)
   :documentation			; FDL
   "Solve the system A x = b in-place using the
   Cholesky decomposition of A into the matrix cholesky given
diff --git a/linear-algebra/diagonal.lisp b/linear-algebra/diagonal.lisp
index b0b468cf95ce5af710e07b448bd8b891f807e965..41a2ee0c523c766fe4acce9851cd0cd9f5244c09 100644
--- a/linear-algebra/diagonal.lisp
+++ b/linear-algebra/diagonal.lisp
@@ -1,6 +1,6 @@
 ;; Tridiagonal and Bidiagonal matrices
 ;; Liam Healy, Thu May  4 2006 - 15:43
-;; Time-stamp: <2008-08-12 22:02:14EDT diagonal.lisp>
+;; Time-stamp: <2008-12-07 18:31:38EST diagonal.lisp>
 ;; $Id$
 
 (in-package :gsl)
@@ -28,7 +28,6 @@
   :element-types :doubles
   :inputs (A)
   :outputs (A tau)
-  :return (A tau)
   :documentation			; FDL
   "Factorizes the symmetric square matrix or hermitian matrix A into the
    symmetric tridiagonal decomposition Q T Q^T.  On output the
@@ -49,7 +48,6 @@
   :element-types :doubles
   :inputs (A tau)
   :outputs (Q diag subdiag)
-  :return (Q diag subdiag)
   :documentation			; FDL
   "Unpacks the encoded symmetric tridiagonal decomposition
   (A, tau) obtained from #'tridiagonal-decomposition into the
@@ -65,7 +63,6 @@
   :element-types :doubles
   :inputs (A)
   :outputs (diag subdiag)
-  :return (diag subdiag)
   :documentation			; FDL
   "Unpack the diagonal and subdiagonal of the encoded symmetric
    tridiagonal decomposition (A, tau) obtained from
@@ -90,7 +87,6 @@
    ((mpointer tau-V) :pointer))
   :inputs (A)
   :outputs (A tau-U tau-V)
-  :return (A tau-U tau-V)
   :documentation			; FDL
   "Factorize the M-by-N matrix A into
    bidiagonal form U B V^T.  The diagonal and superdiagonal of the
@@ -110,7 +106,6 @@
    ((mpointer diag) :pointer) ((mpointer superdiag) :pointer))
   :inputs (A tau-U tau-V)
   :outputs (U V diag superdiag)
-  :return (U V diag superdiag)
   :documentation			; FDL
   "Unpack the bidiagonal decomposition of A given by
    #'bidiagonal-decomposition (A, tau-U, tau-V)
@@ -126,7 +121,6 @@
    ((mpointer tau-V) :pointer) ((mpointer V) :pointer))
   :inputs (A tau-U tau-V)
   :outputs (A V)
-  :return (A V)
   :documentation			; FDL
   "Unpack the bidiagonal decomposition of A given by
    #'bidiagonal-decomposition (A, tau-U, tau-V)
@@ -140,7 +134,6 @@
    ((mpointer superdiag) :pointer))
   :inputs (A)
   :outputs (diag superdiag)
-  :return (diag superdiag)
   :documentation			; FDL
   "Unpack the diagonal and superdiagonal of the bidiagonal
   decomposition of A given by #'bidiagonal-decomposition, into the
@@ -157,7 +150,6 @@
    ((mpointer x) :pointer))
   :inputs (diag superdiag subdiag b)
   :outputs (x)
-  :return (x)
   :documentation			; FDL
   "Solve the general N-by-N system A x = b where A is tridiagonal
    (N >= 2). The super-diagonal and
@@ -175,7 +167,6 @@
    ((mpointer b) :pointer) ((mpointer x) :pointer))
   :inputs (diag off-diagonal b)
   :outputs (x)
-  :return (x)
   :documentation			; FDL
   "Solve the general N-by-N system A x = b where A is
    symmetric tridiagonal (N >= 2).  The off-diagonal vector
@@ -193,7 +184,6 @@
    ((mpointer b) :pointer) ((mpointer x) :pointer))
   :inputs (diag super-diag sub-diag)
   :outputs (x)
-  :return (x)
   :documentation			; FDL
   "Solve the general N-by-N system A x = b where A is cyclic
    tridiagonal (N >= 3).  The cyclic super-diagonal and
@@ -211,7 +201,6 @@
    ((mpointer b) :pointer) ((mpointer x) :pointer))
   :inputs (diag off-diagonal b)
   :outputs (x)
-  :return (x)
   :documentation			; FDL
   "Solve the general N-by-N system A x = b where A is symmetric
    cyclic tridiagonal (N >= 3).  The cyclic
diff --git a/linear-algebra/exponential.lisp b/linear-algebra/exponential.lisp
index b9d56e5fd3a4e59287d3efa631f5d562611922fb..18de25678a1912e64a4423b6a857d2a70d380f94 100644
--- a/linear-algebra/exponential.lisp
+++ b/linear-algebra/exponential.lisp
@@ -1,6 +1,6 @@
 ;; Exponential of a matrix
 ;; Liam Healy 2008-08-10 17:25:35EDT exponential.lisp
-;; Time-stamp: <2008-11-30 23:35:44EST exponential.lisp>
+;; Time-stamp: <2008-12-07 18:31:37EST exponential.lisp>
 ;; $Id: $
 
 (in-package :gsl)
@@ -12,7 +12,6 @@
    (mode sf-mode))
   :inputs (matrix)
   :outputs (exponential)
-  :return (exponential)
   :documentation
   "Calculate the matrix exponential by the scaling and
    squaring method described in Moler + Van Loan,
diff --git a/linear-algebra/householder.lisp b/linear-algebra/householder.lisp
index fb67bd2d2f34d78eceff8d54ae30add78968f980..1bfd10fd72416407784f32bb6c285f4644947d13 100644
--- a/linear-algebra/householder.lisp
+++ b/linear-algebra/householder.lisp
@@ -1,6 +1,6 @@
 ;; Householder Transformations
 ;; Liam Healy, Wed May 10 2006 - 10:03
-;; Time-stamp: <2008-08-11 22:31:45EDT householder.lisp>
+;; Time-stamp: <2008-12-07 18:31:26EST householder.lisp>
 ;; $Id$
 
 ;;; For householder-transform, it would be nice to be able to pick the
@@ -25,6 +25,7 @@
 (defmfun householder-transform (v)
   "gsl_linalg_householder_transform"
   (((mpointer v) :pointer))
+  :inputs (v)
   :outputs (v)
   :c-return (ret :double)
   :return (v ret)
@@ -37,6 +38,7 @@
 (defmfun householder-HM (tau v A)
   "gsl_linalg_householder_hm"
   ((tau :double) ((mpointer v) :pointer) ((mpointer A) :pointer))
+  :inputs (v A)
   :outputs (A)
   :documentation			; FDL
   "Apply the Householder matrix P defined by the
@@ -46,6 +48,7 @@
 (defmfun householder-MH (tau v A)
   "gsl_linalg_householder_mh"
   ((tau :double) ((mpointer v) :pointer) ((mpointer A) :pointer))
+  :inputs (v A)
   :outputs (A)
   :documentation			; FDL
   "Apply the Householder matrix P defined by the
@@ -55,11 +58,12 @@
 (defmfun householder-Hv (tau v w)
   "gsl_linalg_householder_hv"
   ((tau :double) ((mpointer v) :pointer) ((mpointer w) :pointer))
+  :inputs (v w)
+  :outputs (w)
   :documentation			; FDL
   "Apply the Householder transformation P defined by
   the scalar tau and the vector v to the vector w.  On
-  output the result P w is stored in w."
-  :outputs (w))
+  output the result P w is stored in w.")
 
 ;;;;****************************************************************************
 ;;;; Householder solver for linear systems
@@ -69,6 +73,7 @@
   "gsl_linalg_HH_solve"
   (((mpointer A) :pointer) ((mpointer b) :pointer)
    ((mpointer x) :pointer))
+  :inputs (A b x)
   :outputs (x A)
   :return (x)
   :documentation			; FDL
@@ -80,6 +85,7 @@
 (defmfun householder-svx (A x)
   "gsl_linalg_HH_svx"
   (((mpointer A) :pointer) ((mpointer x) :pointer))
+  :inputs (A x)
   :outputs (x A)
   :return (x)
   :documentation			; FDL
diff --git a/linear-algebra/lu.lisp b/linear-algebra/lu.lisp
index c2aa8564dc97ab77d1666b9c2a1def2f01756b62..28b89aac6b50fb10c771cef6ba6056d75ca83b95 100644
--- a/linear-algebra/lu.lisp
+++ b/linear-algebra/lu.lisp
@@ -1,6 +1,6 @@
 ;; LU decomposition
 ;; Liam Healy, Thu Apr 27 2006 - 12:42
-;; Time-stamp: <2008-11-30 23:44:35EST lu.lisp>
+;; Time-stamp: <2008-12-07 18:32:04EST lu.lisp>
 ;; $Id$
 
 (in-package :gsl)
@@ -39,7 +39,6 @@
   :definition :generic
   :inputs (LU p b)
   :outputs (x)
-  :return (x)
   :element-types :doubles
   :documentation			; FDL
   "Solve the square system A x = b using the LU
@@ -52,7 +51,6 @@
   :definition :generic
   :inputs (LU p)
   :outputs (x)
-  :return (x)
   :element-types :doubles
   :documentation			; FLD
   "Solve the square system A x = b in-place
@@ -83,7 +81,6 @@
   :definition :generic
   :inputs (LU p)
   :outputs (inverse)
-  :return (inverse)
   :element-types :doubles
   :documentation			; FDL
   "Compute the inverse of a matrix A from its LU
@@ -138,7 +135,7 @@
   "Invert the matrix."
   (letm ((mmat mat)
 	 (dim (array-dimension mat 0))
-	 (per (permutation dim))
+	 (per (make-permutation dim))
 	 (inv (make-array* 'double-float :dimensions (list dim dim))))
     (LU-decomposition mmat per)
     (lu-invert mmat per inv)
diff --git a/linear-algebra/qr.lisp b/linear-algebra/qr.lisp
index 4ac521bbd4c79d7497266b461874f87e11571699..3a719db17965d60b022480342f3182cafe7075cf 100644
--- a/linear-algebra/qr.lisp
+++ b/linear-algebra/qr.lisp
@@ -1,6 +1,6 @@
 ;; QR decomposition
 ;; Liam Healy 2008-02-17 11:05:20EST qr.lisp
-;; Time-stamp: <2008-08-11 22:22:09EDT qr.lisp>
+;; Time-stamp: <2008-12-07 18:32:41EST qr.lisp>
 ;; $Id$
 
 (in-package :gsl)
@@ -23,7 +23,6 @@
   (((mpointer A) :pointer) ((mpointer tau) :pointer))
   :inputs (A)
   :outputs (A tau)
-  :return (A tau)
   :documentation 			; FDL
   "Factorize the M-by-N matrix A into the QR decomposition A = Q R.
    On output the diagonal and
@@ -46,7 +45,6 @@
    ((mpointer b) :pointer) ((mpointer x) :pointer))
   :inputs (QR tau b)
   :outputs (x)
-  :return (x)
   :documentation			; FDL
   "Solve the square system A x = b using the QR
    decomposition of A into (QR, tau) given by
@@ -59,7 +57,6 @@
    ((mpointer x) :pointer))
   :inputs (QR tau x)
   :outputs (x)
-  :return (x)
   :documentation			; FDL
   "Solves the square system A x = b in-place using the
   QR decomposition of A into (QR, tau) given by
@@ -73,7 +70,6 @@
    ((mpointer residual) :pointer))
   :inputs (QR tau b)
   :outputs (x residual)
-  :return (x residual)
   :documentation			; FDL
   "The least squares solution to the overdetermined system A x = b
    where the matrix A has more rows than columns.  The least squares
@@ -88,7 +84,6 @@
    ((mpointer v) :pointer))
   :inputs (QR tau)
   :outputs (v)
-  :return (v)
   :documentation			; FDL
   "Apply the matrix Q^T encoded in the decomposition
    (QR, tau) to the vector v, storing the result Q^T v in v.
@@ -102,7 +97,6 @@
    ((mpointer v) :pointer))
   :inputs (QR tau)
   :outputs (v)
-  :return (v)
   :documentation			; FDL
   "Apply the matrix Q encoded in the decomposition
    (QR, tau) to the vector v, storing the result Q v in v.
@@ -116,7 +110,6 @@
    ((mpointer x) :pointer))
   :inputs (QR b)
   :outputs (x)
-  :return (x)
   :documentation			; FDL
   "Solve the triangular system R x = b for x.  It may be useful if the
    product b' = Q^T b has already been computed using QR-QTvec}.")
@@ -126,7 +119,6 @@
   (((mpointer QR) :pointer) ((mpointer x) :pointer))
   :inputs (QR x)
   :outputs (x)
-  :return (x)
   :documentation			; FDL
   "Solve the triangular system R x = b for x in-place. On input x
   should contain the right-hand side b and is replaced by the solution
@@ -139,7 +131,6 @@
    ((mpointer Q) :pointer) ((mpointer R) :pointer))
   :inputs (QR tau)
   :outputs (Q R)
-  :return (Q R)
   :documentation			; FDL
   "Unpack the encoded QR decomposition
   (QR, tau) into the matrices Q and R where
@@ -151,7 +142,6 @@
    ((mpointer b) :pointer) ((mpointer x) :pointer))
   :inputs (Q R b)
   :outputs (x)
-  :return (x)
   :documentation			; FDL
   "Solves the system R x = Q^T b for x.  It can
   be used when the QR decomposition of a matrix is available in
@@ -177,7 +167,6 @@
    ((mpointer x) :pointer))
   :inputs (R b)
   :outputs (x)
-  :return (x)
   :documentation			; FDL
   "Solves the triangular system R x = b for the N-by-N matrix R.")
 
@@ -186,7 +175,6 @@
   (((mpointer R) :pointer) ((mpointer x) :pointer))
   :inputs (R x)
   :outputs (x)
-  :return (x)
   :documentation			; FDL
   "Solve the triangular system R x = b in-place. On
   input x should contain the right-hand side b, which is
diff --git a/linear-algebra/qrpt.lisp b/linear-algebra/qrpt.lisp
index a64f7cdb33498c102075731e9c267bcaf5946d3f..2f006466d536bbab6167edf94e9edbe7ffe74377 100644
--- a/linear-algebra/qrpt.lisp
+++ b/linear-algebra/qrpt.lisp
@@ -1,6 +1,6 @@
 ;; QR with column pivoting
 ;; Liam Healy, Fri Apr 28 2006 - 16:53
-;; Time-stamp: <2008-08-11 22:21:22EDT qrpt.lisp>
+;; Time-stamp: <2008-12-07 18:33:01EST qrpt.lisp>
 ;; $Id$
 
 (in-package :gsl)
@@ -55,7 +55,6 @@
    ((mpointer b) :pointer) ((mpointer x) :pointer))
   :inputs (QR tau p b)
   :outputs (x)
-  :return (x)
   :documentation 			; FDL
   "Solve the square system A x = b using the QRP^T
    decomposition of A into (QR, tau, p) given by #'QRPT-decomposition.")
@@ -66,7 +65,6 @@
    ((mpointer p) :pointer) ((mpointer x) :pointer))
   :inputs (QR tau p x)
   :outputs (x)
-  :return (x)
   :documentation			; FDL
   "Solve the square system A x = b in-place using the
    QRP^T decomposition of A into (QR, tau, p). On input x should contain the
@@ -78,7 +76,6 @@
    ((mpointer b) :pointer) ((mpointer x) :pointer))
   :inputs (QR p b)
   :outputs (x)
-  :return (x)
   :documentation			; FDL
   "Solve the square system R P^T x = Q^T b for
    x. It can be used when the QR decomposition of a matrix is
@@ -105,7 +102,6 @@
    ((mpointer b) :pointer) ((mpointer x) :pointer))
   :inputs (QR p b)
   :outputs (x)
-  :return (x)
   :documentation			; FDL
   "Solve the triangular system R P^T x = b for the
    N-by-N matrix R contained in QR.")
@@ -116,7 +112,6 @@
    ((mpointer x) :pointer))
   :inputs (QR p x)
   :outputs (x)
-  :return (x)
   :documentation			; FDL
   "Solve the triangular system R P^T x = b in-place
   for the N-by-N matrix R contained in QR. On
diff --git a/linear-algebra/svd.lisp b/linear-algebra/svd.lisp
index fc335af4c091b371af6767d51e607b2ac7378305..6799e363a657f2b41b82c701e26190583456f025 100644
--- a/linear-algebra/svd.lisp
+++ b/linear-algebra/svd.lisp
@@ -1,6 +1,6 @@
 ;; Singular Value Decomposition
 ;; Liam Healy, Tue May  2 2006 - 12:15
-;; Time-stamp: <2008-08-11 22:46:49EDT svd.lisp>
+;; Time-stamp: <2008-12-07 18:33:23EST svd.lisp>
 ;; $Id$
 
 (in-package :gsl)
@@ -31,7 +31,6 @@
    ((mpointer S) :pointer) ((mpointer work) :pointer))
   :inputs (A)
   :outputs (A S V)
-  :return (A S V)
   :documentation			; FDL
   "Factorize the M-by-N matrix A into
   the singular value decomposition A = U S V^T for M >= N.
@@ -51,7 +50,6 @@
    ((mpointer S) :pointer) ((mpointer work) :pointer))
   :inputs (A)
   :outputs (A S V)
-  :return (A S V)
   :documentation			; FDL
   "The SVD using the modified Golub-Reinsch algorithm, which is
    faster for M >> N.  It requires the vector work of length N and the
@@ -63,7 +61,6 @@
    ((mpointer S) :pointer))
   :inputs (A)
   :outputs (A S V)
-  :return (A S V)
   :documentation			; FDL
   "The SVD of the M-by-N matrix A using one-sided Jacobi
    orthogonalization for M >= N.  The Jacobi method can compute singular
@@ -77,7 +74,6 @@
    ((mpointer b) :pointer) ((mpointer x) :pointer))
   :inputs (U S V b)
   :outputs (x)
-  :return (x)
   :documentation			; FDL
   "Solve the system A x = b using the singular value
    decomposition (U, S, V) of A given by #'SV-decomp.
diff --git a/numerical-integration.lisp b/numerical-integration.lisp
index f1b755e02015c3983a5ed91bfc6e830c30caf2c6..4c043e0893b55cdbc82666b599f3aa0cb3c6ba04 100644
--- a/numerical-integration.lisp
+++ b/numerical-integration.lisp
@@ -1,6 +1,6 @@
 ;; Numerical integration
 ;; Liam Healy, Wed Jul  5 2006 - 23:14
-;; Time-stamp: <2008-10-25 11:35:53EDT numerical-integration.lisp>
+;; Time-stamp: <2008-12-07 18:51:13EST numerical-integration.lisp>
 ;; $Id$
 
 ;;; To do: QAWS, QAWO, QAWF, more tests
@@ -129,10 +129,11 @@
    ((mpointer points) :pointer) ((dim0 points) sizet)
    (absolute-error :double) (relative-error :double) (limit sizet) (workspace :pointer)
    (result :double) (abserr :double))
+  :inputs (points)
   :documentation			; FDL
   "Apply the adaptive integration algorithm QAGS taking
    account of the user-supplied locations of singular points.  The array
-   pts of length npts should contain the endpoints of the
+   points should contain the endpoints of the
    integration ranges defined by the integration region and locations of
    the singularities.  For example, to integrate over the region
    (a,b) with break-points at x_1, x_2, x_3 (where 
diff --git a/solve-minimize-fit/linear-least-squares.lisp b/solve-minimize-fit/linear-least-squares.lisp
index f8e11c19e9977cd6c05fcb549078e9c37818e7d7..011b5e6f9b0835c0aefb6ea2143f5b23356bf5b5 100644
--- a/solve-minimize-fit/linear-least-squares.lisp
+++ b/solve-minimize-fit/linear-least-squares.lisp
@@ -1,6 +1,6 @@
 ;; Linear least squares, or linear regression
 ;; Liam Healy <2008-01-21 12:41:46EST linear-least-squares.lisp>
-;; Time-stamp: <2008-11-30 23:28:48EST linear-least-squares.lisp>
+;; Time-stamp: <2008-12-07 19:04:02EST linear-least-squares.lisp>
 ;; $Id$
 
 (in-package :gsl)
@@ -22,6 +22,7 @@
    ((dim0 x) sizet) (c0 :double) (c1 :double)
    (cov00 :double) (cov01 :double) (cov11 :double)
    (sumsq :double))
+  :inputs (x y)
   :documentation			; FDL
   "Determine the best-fit linear regression coefficients
    and returns as the first two values c0,c1
@@ -44,6 +45,7 @@
    ((dim0 x) sizet) (c0 :double) (c1 :double)
    (cov00 :double) (cov01 :double) (cov11 :double)
    (chisq :double))
+  :inputs (x weight y)
   :documentation			; FDL
   "Compute the best-fit linear regression coefficients
    c0, c1 of the model Y = c_0 + c_1 X for the weighted
@@ -81,6 +83,7 @@
    ((c-pointer y) :pointer) (y-stride sizet)
    ((dim0 x) sizet) (c1 :double) (cov11 :double)
    (sumsq :double))
+  :inputs (x y)
   :documentation			; FDL
   "The best-fit linear regression coefficient c1 of the model Y = c_1
    X for the datasets (x, y) two vectors of equal length with strides x-stride
@@ -98,6 +101,7 @@
    ((c-pointer y) :pointer) (y-stride sizet)
    ((dim0 x) sizet) (c1 :double) (cov11 :double)
    (chisq :double))
+  :inputs (x weight y)
   :documentation			; FDL
   "Compute the best-fit linear regression coefficient
    c1 of the model Y = c_1 X for the weighted datasets
@@ -151,6 +155,8 @@
    (tolerance :double)
    ((mpointer parameters) :pointer) (covariance :pointer) (chisq :double)
    (workspace :pointer))
+  :inputs (model observations)
+  :outputs (parameters covariance)
   :documentation			; FDL
   "Compute the best-fit parameters c of the model
    y = X c for the observations y and the matrix of predictor
@@ -173,14 +179,16 @@
    (rank sizet)
    ((mpointer parameters) :pointer) (covariance :pointer) (chisq :double)
    (workspace :pointer))
+  :inputs (model observations)
+  :outputs (parameters covariance)
   :return ((dcref chisq) (scref rank))
   :documentation			; FDL
   "Compute the best-fit parameters c of the model
    y = X c for the observations y and the matrix of predictor
    variables X.  The variance-covariance matrix of the model
    parameters cov is estimated from the scatter of the observations
-   about the best-fit.  The sum of squares of the residuals from the
-   best-fit, chi^2, is returned.
+   about the best-fit.  The sum of squares of the residuals
+   from the best-fit chi^2, and rank are returned.
 
    The best-fit is found by singular value decomposition of the matrix
    X using the preallocated workspace provided. The
@@ -201,6 +209,8 @@
    ((mpointer parameters) :pointer)
    ((mpointer covariance) :pointer) (chisq :double)
    (workspace :pointer))
+  :inputs (model observations)
+  :outputs (parameters covariance)
   :documentation			; FDL
   "Compute the best-fit parameters c of the weighted
    model y = X c for the observations y and weights
@@ -224,13 +234,15 @@
    (rank sizet)
    ((mpointer parameters) :pointer) (covariance :pointer) (chisq :double)
    (workspace :pointer))
+  :inputs (model weight observations)
+  :outputs (parameters covariance)
   :return ((dcref chisq) (scref rank))
   :documentation			; FDL
   "Compute the best-fit parameters c of the weighted
    model y = X c for the observations y and weights
    and the model matrix X.  The covariance matrix of
-   the model parameters is computed with the given weights.  The
-   weighted sum of squares of the residuals from the best-fit,
+   the model parameters is computed with the given weights.  
+   The weighted sum of squares of the residuals from the best-fit,
    chi^2, is returned as the first value.
 
    The best-fit is found by singular value decomposition of the matrix
@@ -245,6 +257,7 @@
   "gsl_multifit_linear_est"
   (((mpointer x) :pointer) ((mpointer coefficients) :pointer)
    ((mpointer covariance) :pointer) (y :double) (y-error :double))
+  :inputs (x coefficients covariance)
   :documentation			; FDL
   "Use the best-fit multilinear regression coefficients
    and their covariance matrix to compute the fitted function value
diff --git a/solve-minimize-fit/minimization-multi.lisp b/solve-minimize-fit/minimization-multi.lisp
index c6d99a5c2db7947b47e2f776f3fcec6209075dc9..174e65c728b6b8ab3c9ad4d68790ba4243465287 100644
--- a/solve-minimize-fit/minimization-multi.lisp
+++ b/solve-minimize-fit/minimization-multi.lisp
@@ -1,6 +1,6 @@
 ;; Multivariate minimization.
 ;; Liam Healy  <Tue Jan  8 2008 - 21:28>
-;; Time-stamp: <2008-11-30 23:29:45EST minimization-multi.lisp>
+;; Time-stamp: <2008-12-07 19:09:05EST minimization-multi.lisp>
 ;; $Id$
 
 (in-package :gsl)
@@ -78,6 +78,7 @@
   "gsl_multimin_fminimizer_set"
   ((minimizer :pointer) (function :pointer)
    ((mpointer initial) :pointer) ((mpointer step-size) :pointer))
+  :inputs (initial step-size)
   :export nil
   :index (letm mfminimizer)
   :documentation			; FDL
@@ -93,6 +94,7 @@
   ((minimizer :pointer) (function-derivative :pointer)
    ((mpointer initial) :pointer) (step-size :double)
    (tolerance :double))
+  :inputs (initial)
   :export nil
   :index (letm mfdfminimizer)
   :documentation			; FDL
diff --git a/solve-minimize-fit/roots-multi.lisp b/solve-minimize-fit/roots-multi.lisp
index 0dc853a2e95714cbe11dc1449ac8ea0c79f9883d..91bfd98ee2278224f144886566776d46162a57f4 100644
--- a/solve-minimize-fit/roots-multi.lisp
+++ b/solve-minimize-fit/roots-multi.lisp
@@ -1,6 +1,6 @@
 ;;; Multivariate roots.                
 ;;; Liam Healy 2008-01-12 12:49:08
-;;; Time-stamp: <2008-11-30 23:27:04EST roots-multi.lisp>
+;;; Time-stamp: <2008-12-07 19:09:04EST roots-multi.lisp>
 ;;; $Id$
 
 (in-package :gsl)
@@ -74,6 +74,7 @@
 (defmfun set-mfsolver (solver function initial)
   "gsl_multiroot_fsolver_set"
   ((solver :pointer) (function :pointer) ((mpointer initial) :pointer))
+  :inputs (initial)
   :export nil
   :index (letm mfsolver)
   :documentation			; FDL
@@ -84,6 +85,7 @@
   "gsl_multiroot_fdfsolver_set"
   ((solver :pointer) (function-derivative :pointer)
    ((mpointer initial) :pointer))
+  :inputs (initial)
   :export nil
   :index (letm mfdfsolver)
   :documentation			; FDL
diff --git a/sorting.lisp b/sorting.lisp
index fe37a84952b86683b42791cfd82c0f77787fae40..6d5755c744ed0998eeb62fee13d8bf5456882378 100644
--- a/sorting.lisp
+++ b/sorting.lisp
@@ -1,6 +1,6 @@
 ;; Sorting
 ;; Liam Healy, Fri Apr 14 2006 - 20:20
-;; Time-stamp: <2008-12-06 17:46:20EST sorting.lisp>
+;; Time-stamp: <2008-12-07 18:43:39EST sorting.lisp>
 ;; $Id$
 
 (in-package :gsl)
@@ -64,6 +64,7 @@
   :definition :generic
   :element-types :no-complex
   :c-return :void
+  :inputs (v)
   :outputs (v)
   :documentation			; FDL
   "Sort the n elements of the array data with stride stride into
@@ -75,6 +76,7 @@
   :definition :generic
   :element-types :no-complex
   :c-return :void
+  :inputs (v)
   :outputs (v)
   :documentation			; FDL
   "Sort the elements of the vector v into ascending numerical order.")
@@ -126,6 +128,7 @@
   :definition :generic
   :element-types :no-complex
   :c-return :void
+  :inputs (v)
   :outputs (dest)
   :documentation			; FDL
   "Find the smallest elements of the vector v and put them into dest,
@@ -140,6 +143,7 @@
   :definition :generic
   :element-types :no-complex
   :c-return :void
+  :inputs (v)
   :outputs (dest)
   :documentation			; FDL
   "Find the smallest elements of the vector v and put them into dest,
@@ -154,7 +158,8 @@
   :definition :generic
   :element-types :no-complex
   :c-return :void
-  :return (combination)
+  :inputs (v)
+  :outputs (combination)
   :documentation
   "The indices of the smallest elements of the vector stored,
     returned as a CL vector of element type fixnum.  If
@@ -162,8 +167,7 @@
     allocated and returned.  If it is a CL vector,
     it will be filled with the indices.")
 
-(defmfun sort-smallest-index
-    (combination (v vector))
+(defmfun sort-smallest-index (combination (v vector))
   ("gsl_sort" :type "_smallest_index")
   (((c-pointer combination) :pointer) ((total-size combination) sizet)
    ((c-pointer v) :pointer)
@@ -172,7 +176,8 @@
   :definition :generic
   :element-types :no-complex
   :c-return :void
-  :return (combination)
+  :inputs (v)
+  :outputs (combination)
   :documentation
   "The indices of the smallest elements of the vector stored,
     returned as a CL vector of element type fixnum.  If
@@ -187,6 +192,7 @@
   :definition :generic
   :element-types :no-complex
   :c-return :void
+  :inputs (v)
   :outputs (dest)
   :documentation			; FDL
   "Find the largest elements of the vector v and put them into dest,
@@ -201,13 +207,13 @@
   :definition :generic
   :element-types :no-complex
   :c-return :void
+  :inputs (v)
   :outputs (dest)
   :documentation			; FDL
   "Find the largest elements of the vector v and put them into dest,
    which must be shorter than v.")
 
-(defmfun sort-vector-largest-index
-    (combination (v vector))
+(defmfun sort-vector-largest-index (combination (v vector))
   ("gsl_sort_vector" :type "_largest_index")
   (((c-pointer combination) :pointer) ((total-size combination) sizet)
    ((mpointer v) :pointer)
@@ -216,7 +222,8 @@
   :definition :generic
   :element-types :no-complex
   :c-return :void
-  :return (combination)
+  :inputs (v)
+  :outputs (combination)
   :documentation
   "The indices of the largest elements of the vector stored,
     returned as a CL vector of element type fixnum.  If
@@ -224,8 +231,7 @@
     allocated and returned.  If it is a CL vector,
     it will be filled with the indices.")
 
-(defmfun sort-largest-index
-    (combination (v vector))
+(defmfun sort-largest-index (combination (v vector))
   ("gsl_sort" :type "_largest_index")
   (((c-pointer combination) :pointer) ((total-size combination) sizet)
    ((c-pointer v) :pointer)
@@ -234,7 +240,8 @@
   :element-types :no-complex
   :definition :generic
   :c-return :void
-  :return (combination)
+  :inputs (v)
+  :outputs (combination)
   :documentation
   "The indices of the largest elements of the vector stored,
     returned as a CL vector of element type fixnum.  If
diff --git a/statistics/absolute-deviation.lisp b/statistics/absolute-deviation.lisp
index 76922878d7bed99b1fb33d5f2792e2914bfcf745..485c02f6c2c1d2d2266df4810bdbe06cd7836ff8 100644
--- a/statistics/absolute-deviation.lisp
+++ b/statistics/absolute-deviation.lisp
@@ -1,6 +1,6 @@
 ;; Absolute deviation
 ;; Liam Healy, Sun Dec 31 2006 - 13:19
-;; Time-stamp: <2008-11-30 23:35:46EST absolute-deviation.lisp>
+;; Time-stamp: <2008-12-07 18:44:47EST absolute-deviation.lisp>
 ;; $Id$
 
 (in-package :gsl)
@@ -17,6 +17,7 @@
   :definition :generic
   :element-types :no-complex
   :c-return :double
+  :inputs (data)
   :documentation			; FDL
   "The absolute deviation from the mean of data.  The absolute
   deviation from the mean is defined as absdev = (1/N) \sum |x_i -
@@ -41,6 +42,7 @@
   :definition :generic
   :element-types :float
   :c-return :double
+  :inputs (data weights)
   :documentation			; FDL
   "The weighted absolute deviation from the weighted
    mean, defined as
diff --git a/statistics/autocorrelation.lisp b/statistics/autocorrelation.lisp
index f4800d578227d2752d83c240dc3006bc4999fd02..cc384b6e446cc4a8e7d6de34d811bf4d92e1e38f 100644
--- a/statistics/autocorrelation.lisp
+++ b/statistics/autocorrelation.lisp
@@ -1,6 +1,6 @@
 ;; Autocorrelation
 ;; Liam Healy, Sun Dec 31 2006 - 13:19
-;; Time-stamp: <2008-11-30 23:34:37EST autocorrelation.lisp>
+;; Time-stamp: <2008-12-07 18:45:02EST autocorrelation.lisp>
 ;; $Id$
 
 (in-package :gsl)
@@ -17,6 +17,7 @@
   :definition :generic
   :element-types :no-complex
   :c-return :double
+  :inputs (data)
   :documentation			; FDL
   "The lag-1 autocorrelation of the dataset data.
   a_1 = {\sum_{i = 1}^{n} (x_{i} - \Hat\mu) (x_{i-1} - \Hat\mu)
diff --git a/statistics/covariance.lisp b/statistics/covariance.lisp
index fc64e4e12c9bbd47184171709770783ff7827840..a79b20513484162e70d0b53fab3ba5383774e06f 100644
--- a/statistics/covariance.lisp
+++ b/statistics/covariance.lisp
@@ -1,6 +1,6 @@
 ;; Covariance
 ;; Liam Healy, Sun Dec 31 2006 - 13:19
-;; Time-stamp: <2008-11-30 23:34:37EST covariance.lisp>
+;; Time-stamp: <2008-12-07 18:45:21EST covariance.lisp>
 ;; $Id$
 
 (in-package :gsl)
@@ -20,6 +20,7 @@
   :definition :generic
   :element-types :no-complex
   :c-return :double
+  :inputs (data1 data2)
   :documentation			; FDL
   "The covariance of the datasets data1 and data2 which must
    be of the same length,
diff --git a/statistics/higher-moments.lisp b/statistics/higher-moments.lisp
index 6abdcead57d84544cb904484158917ec2f229df8..cb17d21f31c08ec19ae5cc1a0cde909980774c2f 100644
--- a/statistics/higher-moments.lisp
+++ b/statistics/higher-moments.lisp
@@ -1,6 +1,6 @@
 ;; Skewness and kurtosis.
 ;; Liam Healy, Sun Dec 31 2006 - 14:20
-;; Time-stamp: <2008-11-30 23:32:16EST higher-moments.lisp>
+;; Time-stamp: <2008-12-07 18:46:13EST higher-moments.lisp>
 ;; $Id$
 
 (in-package :gsl)
@@ -16,6 +16,7 @@
   :definition :generic
   :element-types :no-complex
   :c-return :double
+  :inputs (data)
   :documentation			; FDL
   "The skewness of data, defined as skew = (1/N) \sum ((x_i -
   \Hat\mu)/\Hat\sigma)^3 where x_i are the elements of the dataset
@@ -35,6 +36,7 @@
   :definition :generic
   :element-types :no-complex
   :c-return :double
+  :inputs (data)
   :documentation			; FDL
   "The kurtosis of data defined as
    kurtosis = ((1/N) \sum ((x_i - \Hat\mu)/\Hat\sigma)^4)  - 3
@@ -56,6 +58,7 @@
   :definition :generic
   :element-types :float
   :c-return :double
+  :inputs (data weights)
   :documentation			; FDL
   "The weighted skewness of the dataset.
    skew = (\sum w_i ((x_i - xbar)/\sigma)^3) / (\sum w_i).")
@@ -74,6 +77,7 @@
   :definition :generic
   :element-types :float
   :c-return :double
+  :inputs (data weights)
   :documentation			; FDL
   "The weighted kurtosis of the dataset.
    kurtosis = ((\sum w_i ((x_i - xbar)/sigma)^4) / (\sum w_i)) - 3.")
diff --git a/statistics/mean-variance.lisp b/statistics/mean-variance.lisp
index 4e7f8e6d1dbe1299f51895991c90edf50ea3acd6..7e81b9ca235ea3d31274ad552b3766bd47565554 100644
--- a/statistics/mean-variance.lisp
+++ b/statistics/mean-variance.lisp
@@ -1,6 +1,6 @@
 ;; Mean, standard deviation, and variance    
 ;; Liam Healy, Sat Dec  2 2006 - 22:15
-;; Time-stamp: <2008-11-09 11:50:03EST mean-variance.lisp>
+;; Time-stamp: <2008-12-07 19:13:40EST mean-variance.lisp>
 ;; $Id$
 
 (in-package :gsl)
@@ -18,6 +18,7 @@
   :definition :generic
   :element-types :no-complex
   :c-return :double
+  :inputs (array)
   :documentation			; FDL
    "The arithmetic mean of the array.
    The arithmetic mean, or sample mean, is denoted by
@@ -31,6 +32,7 @@
   :definition :generic
   :element-types :float
   :c-return :element-c-type
+  :inputs (array weights)
   :documentation			; FDL
   "The weighted mean of the dataset, using the set of weights
     The weighted mean is defined as
@@ -49,6 +51,7 @@
   :definition :generic
   :element-types :no-complex
   :c-return :double
+  :inputs (array)
   :documentation			; FDL
   "The estimated, or sample, variance of data.  The
    estimated variance is denoted by \Hat\sigma^2 and is defined by
@@ -73,6 +76,7 @@
   :definition :generic
   :element-types :float
   :c-return :double
+  :inputs (array weights)
   :documentation			; FDL
   "The estimated variance of a weighted dataset is defined as
    \Hat\sigma^2 = ((\sum w_i)/((\sum w_i)^2 - \sum (w_i^2))) 
@@ -95,6 +99,7 @@
   :definition :generic
   :element-types :no-complex
   :c-return :double
+  :inputs (array)
   :documentation			; FDL
   "The standard deviation, square root of the variance.
    If the mean value is known, it may be supplied which will use more
@@ -112,6 +117,7 @@
   :definition :generic
   :element-types :float
   :c-return :double
+  :inputs (array weights)
   :documentation			; FDL
   "The weighted standard deviation, square root of the variance.
    If the mean value is known, it may be supplied which will use more
@@ -128,6 +134,7 @@
   :definition :generic
   :element-types :no-complex
   :c-return :double
+  :inputs (array)
   :documentation			; FDL
   "An unbiased estimate of the variance of
     data when the population mean of the underlying
@@ -143,6 +150,7 @@
   :definition :generic
   :element-types :no-complex
   :c-return :double
+  :inputs (array)
   :documentation			; FDL
    "The standard deviation of data for a fixed population
     mean.  The result is the square root of the
@@ -161,6 +169,7 @@
   :definition :generic
   :element-types :float
   :c-return :double
+  :inputs (array weights)
   :documentation			; FDL
   "An unbiased estimate of the variance of weighted
     dataset when the population mean of the underlying
@@ -178,6 +187,7 @@
   :definition :generic
   :element-types :float
   :c-return :double
+  :inputs (array weights)
   :documentation			; FDL
   "The square root of the corresponding variance
    function #'weighted-variance-with-fixed-mean.")
diff --git a/statistics/median-percentile.lisp b/statistics/median-percentile.lisp
index 6fd26d02494a5eeb9088051aa6e194d27d2284a8..8d4644ad4ba169cc36c9f676cd23f41bf2f687f6 100644
--- a/statistics/median-percentile.lisp
+++ b/statistics/median-percentile.lisp
@@ -1,6 +1,6 @@
 ;; Median and percentile
 ;; Liam Healy, Sun Dec 31 2006 - 13:19
-;; Time-stamp: <2008-11-30 23:33:15EST median-percentile.lisp>
+;; Time-stamp: <2008-12-07 18:48:02EST median-percentile.lisp>
 ;; $Id$
 
 (in-package :gsl)
@@ -14,6 +14,7 @@
   :definition :generic
   :element-types :no-complex
   :c-return :double
+  :inputs (sorted-data)
   :documentation			; FDL
   "The median value of sorted-data.  The elements of the array
    must be in ascending numerical order.  There are no checks to see
@@ -33,6 +34,7 @@
   :definition :generic
   :element-types :no-complex
   :c-return :double
+  :inputs (sorted-data)
   :documentation			; FDL
   "A quantile value of sorted-data.  The
    elements of the array must be in ascending numerical order.  The
diff --git a/wavelet.lisp b/wavelet.lisp
index c5e02ab00a592a03e305cbbf701062205c7e8586..629725cc62ec5bb15baafeb8a827e114368e772e 100644
--- a/wavelet.lisp
+++ b/wavelet.lisp
@@ -1,6 +1,6 @@
 ;; Wavelet transforms.
 ;; Liam Healy, Mon Nov 26 2007 - 20:43
-;; Time-stamp: <2008-11-30 23:47:59EST wavelet.lisp>
+;; Time-stamp: <2008-12-07 17:52:23EST wavelet.lisp>
 ;; $Id$
 
 (in-package :gsl)
@@ -392,7 +392,7 @@
 	 (workspace (wavelet-workspace n)))
     (wavelet-transform-forward wavelet vector 1 workspace)
     (letm ((absvector (make-array* 'double-float :dimensions n))
-	   (permutation (permutation n)))
+	   (permutation (make-permutation n)))
       (dotimes (i n)
 	(setf (maref absvector i) (abs (maref vector i))))
       ;; Sort and set to 0 all but the largest 20.