|
Revision 47, 1.3 kB
(checked in by lhealy, 8 months ago)
|
|
Unification of errors and warnings using a single class
'gsl-condition. Each numbered GSL conditions is a subclass of this
condition, under the name given by GSL, e.g. 'EDOM.
|
-
Property svn:keywords set to
Id
|
| Line | |
|---|
| 1 | ;; Jacobian elliptic functions |
|---|
| 2 | ;; Liam Healy, Mon Mar 20 2006 - 22:21 |
|---|
| 3 | ;; Time-stamp: <2008-03-27 21:29:35EDT elliptic-functions.lisp> |
|---|
| 4 | ;; $Id$ |
|---|
| 5 | |
|---|
| 6 | (in-package :gsl) |
|---|
| 7 | |
|---|
| 8 | (defmfun jacobian-elliptic-functions (u m) |
|---|
| 9 | "gsl_sf_elljac_e" |
|---|
| 10 | ((u :double) (m :double) (sn sf-result) (cn sf-result) (dn sf-result)) |
|---|
| 11 | :return ((val sn) (val cn) (val dn) (err sn) (err cn) (err dn)) |
|---|
| 12 | :documentation ; FDL |
|---|
| 13 | "The Jacobian elliptic functions sn(u|m), |
|---|
| 14 | cn(u|m), dn(u|m) computed by descending Landen transformations.") |
|---|
| 15 | |
|---|
| 16 | ;;; > (jacobian-elliptic-functions 0.61802d0 0.5d0) |
|---|
| 17 | ;;; 0.564575752943391 |
|---|
| 18 | ;;; 0.8253812568676386 |
|---|
| 19 | ;;; 0.916857191493965 |
|---|
| 20 | ;;; > (jacobian-elliptic-functions 0.2d0 0.81d0) |
|---|
| 21 | ;;; 0.19762082367187697 |
|---|
| 22 | ;;; 0.9802785369736752 |
|---|
| 23 | ;;; 0.9840560289645665 |
|---|
| 24 | ;;; > (jacobian-elliptic-functions 0.61802d0 1.5d0) |
|---|
| 25 | ;;; ;;;error |
|---|
| 26 | |
|---|
| 27 | |
|---|
| 28 | #| |
|---|
| 29 | (make-tests elliptic-functions |
|---|
| 30 | (jacobian-elliptic-functions 0.2d0 0.81d0) |
|---|
| 31 | (jacobian-elliptic-functions 0.61802d0 1.5d0)) |
|---|
| 32 | |# |
|---|
| 33 | |
|---|
| 34 | (LISP-UNIT:DEFINE-TEST ELLIPTIC-FUNCTIONS |
|---|
| 35 | (LISP-UNIT::ASSERT-NUMERICAL-EQUAL |
|---|
| 36 | (LIST 0.19762082367187703d0 0.9802785369736752d0 |
|---|
| 37 | 0.9840560289645665d0 0.0d0 0.0d0 0.0d0) |
|---|
| 38 | (MULTIPLE-VALUE-LIST |
|---|
| 39 | (JACOBIAN-ELLIPTIC-FUNCTIONS 0.2d0 0.81d0))) |
|---|
| 40 | (LISP-UNIT:ASSERT-ERROR 'GSL-CONDITION |
|---|
| 41 | (JACOBIAN-ELLIPTIC-FUNCTIONS |
|---|
| 42 | 0.61802d0 1.5d0))) |
|---|
| 43 | |
|---|