root/trunk/special-functions/laguerre.lisp

Revision 26, 1.9 kB (checked in by lhealy, 9 months ago)

Subversion version stamp.

  • Property svn:keywords set to Id
Line 
1;; Laguerre polynomials
2;; Liam Healy, Fri Apr 28 2006 - 20:40
3;; Time-stamp: <2008-02-16 22:16:49EST laguerre.lisp>
4;; $Id$
5
6(in-package :gsl)
7
8(defmfun laguerre-1 (a x)
9  "gsl_sf_laguerre_1_e" ((a :double) (x :double) (ret sf-result))
10  :documentation                        ; FDL
11  "The generalized Laguerre polynomial L^a_1(x) using
12   explicit representations.")
13
14(defmfun laguerre-2 (a x)
15  "gsl_sf_laguerre_2_e" ((a :double) (x :double) (ret sf-result))
16  :documentation                        ; FDL
17  "The generalized Laguerre polynomial
18   L^a_2(x) using explicit representations.")
19
20(defmfun laguerre-3 (a x)
21  "gsl_sf_laguerre_3_e" ((a :double) (x :double) (ret sf-result))
22  :documentation                        ; FDL
23  "The generalized Laguerre polynomial
24   L^a_3(x) using explicit representations.")
25
26(defmfun laguerre (n a x)
27  "gsl_sf_laguerre_n_e" ((n :int) (a :double) (x :double) (ret sf-result))
28  :documentation                        ; FDL
29  "The generalized Laguerre polynomials L^a_n(x) for a > -1, n >= 0.")
30
31;;;;****************************************************************************
32;;;; Examples and unit test
33;;;;****************************************************************************
34
35#|
36;;; Don't slime-macroexpand-1, the last one will produce an error that
37;;; shouldn't be there.
38
39(make-tests laguerre
40  (laguerre-1 1.0d0 3.0d0)
41  (laguerre-2 1.0d0 3.0d0)
42  (laguerre-3 1.0d0 3.0d0)
43  (laguerre 4 1.0d0 3.0d0))
44|#
45
46(LISP-UNIT:DEFINE-TEST LAGUERRE
47  (LISP-UNIT::ASSERT-NUMERICAL-EQUAL
48   (LIST -1.0d0 2.220446049250313d-15)
49   (MULTIPLE-VALUE-LIST (LAGUERRE-1 1.0d0 3.0d0)))
50  (LISP-UNIT::ASSERT-NUMERICAL-EQUAL
51   (LIST -1.5d0 1.7985612998927536d-14)
52   (MULTIPLE-VALUE-LIST (LAGUERRE-2 1.0d0 3.0d0)))
53  (LISP-UNIT::ASSERT-NUMERICAL-EQUAL
54   (LIST -0.5d0 6.59472476627343d-14)
55   (MULTIPLE-VALUE-LIST (LAGUERRE-3 1.0d0 3.0d0)))
56  (LISP-UNIT::ASSERT-NUMERICAL-EQUAL
57   (LIST 0.875d0 6.793349802129357d-14)
58   (MULTIPLE-VALUE-LIST (LAGUERRE 4 1.0d0 3.0d0))))
Note: See TracBrowser for help on using the browser.