| 1 | ;; Deybe functions |
|---|
| 2 | ;; Liam Healy, Sun Mar 19 2006 - 14:34 |
|---|
| 3 | ;; Time-stamp: <2008-02-16 20:07:26EST debye.lisp> |
|---|
| 4 | ;; $Id$ |
|---|
| 5 | |
|---|
| 6 | #| |
|---|
| 7 | ;;; FDL |
|---|
| 8 | The Debye functions D_n(x) are defined by the following integral, |
|---|
| 9 | D_n(x) = n/x^n \int_0^x dt (t^n/(e^t - 1)) |
|---|
| 10 | For further information see Abramowitz & |
|---|
| 11 | Stegun, Section 27.1. |
|---|
| 12 | |# |
|---|
| 13 | |
|---|
| 14 | (in-package :gsl) |
|---|
| 15 | |
|---|
| 16 | (defmfun debye-1 (x) |
|---|
| 17 | "gsl_sf_debye_1_e" ((x :double) (ret sf-result)) |
|---|
| 18 | :documentation ; FDL |
|---|
| 19 | "The first-order Debye function D_1(x) = (1/x) \int_0^x dt (t/(e^t - 1)).") |
|---|
| 20 | |
|---|
| 21 | (defmfun debye-2 (x) |
|---|
| 22 | "gsl_sf_debye_2_e" ((x :double) (ret sf-result)) |
|---|
| 23 | :documentation ; FDL |
|---|
| 24 | "The second-order Debye function |
|---|
| 25 | D_2(x) = (2/x^2) \int_0^x dt (t^2/(e^t - 1)).") |
|---|
| 26 | |
|---|
| 27 | (defmfun debye-3 (x) |
|---|
| 28 | "gsl_sf_debye_3_e" ((x :double) (ret sf-result)) |
|---|
| 29 | :documentation ; FDL |
|---|
| 30 | "The third-order Debye function |
|---|
| 31 | D_3(x) = (3/x^3) \int_0^x dt (t^3/(e^t - 1)).") |
|---|
| 32 | |
|---|
| 33 | (defmfun debye-4 (x) |
|---|
| 34 | "gsl_sf_debye_4_e" ((x :double) (ret sf-result)) |
|---|
| 35 | :documentation ; FDL |
|---|
| 36 | "The fourth-order Debye function |
|---|
| 37 | D_4(x) = (4/x^4) \int_0^x dt (t^4/(e^t - 1)).") |
|---|
| 38 | |
|---|
| 39 | #| |
|---|
| 40 | (make-tests debye |
|---|
| 41 | (debye-1 1.0d0) |
|---|
| 42 | (debye-2 1.0d0) |
|---|
| 43 | (debye-3 1.0d0) |
|---|
| 44 | (debye-4 1.0d0)) |
|---|
| 45 | |# |
|---|
| 46 | |
|---|
| 47 | (LISP-UNIT:DEFINE-TEST DEBYE |
|---|
| 48 | (LISP-UNIT::ASSERT-NUMERICAL-EQUAL |
|---|
| 49 | (LIST 0.7775046341122482d0 4.117962028082377d-16) |
|---|
| 50 | (MULTIPLE-VALUE-LIST (DEBYE-1 1.0d0))) |
|---|
| 51 | (LISP-UNIT::ASSERT-NUMERICAL-EQUAL |
|---|
| 52 | (LIST 0.7078784756278294d0 4.948781517277596d-16) |
|---|
| 53 | (MULTIPLE-VALUE-LIST (DEBYE-2 1.0d0))) |
|---|
| 54 | (LISP-UNIT::ASSERT-NUMERICAL-EQUAL |
|---|
| 55 | (LIST 0.6744155640778147d0 5.450931753448871d-16) |
|---|
| 56 | (MULTIPLE-VALUE-LIST (DEBYE-3 1.0d0))) |
|---|
| 57 | (LISP-UNIT::ASSERT-NUMERICAL-EQUAL |
|---|
| 58 | (LIST 0.654874068886737d0 5.769372522202218d-16) |
|---|
| 59 | (MULTIPLE-VALUE-LIST (DEBYE-4 1.0d0)))) |
|---|