root/trunk/special-functions/dilogarithm.lisp

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

Subversion version stamp.

  • Property svn:keywords set to Id
Line 
1;; Dilogarithm
2;; Liam Healy, Fri Mar 17 2006 - 18:44
3;; Time-stamp: <2008-02-16 20:19:55EST dilogarithm.lisp>
4;; $Id$
5
6(in-package :gsl)
7
8;;; dilog merge complex and real
9(defgeneric dilogarithm (x)
10  (:documentation                       ; FDL
11   "The dilogarithm."))
12
13(defmfun dilogarithm ((x float))
14  "gsl_sf_dilog_e" ((x :double) (ret sf-result))
15  :type :method)
16
17(defmfun dilogarithm ((x complex))
18  "gsl_sf_complex_dilog_e"
19  (((abs x) :double) ((phase x) :double) (re sf-result) (im sf-result))
20  :type :method
21  :return ((complex (val re) (val im)) (complex (err re) (err im))))
22
23#|
24(make-tests dilogarithm
25            (dilogarithm 1.0d0)
26            (dilogarithm #c(0.0d0 1.0d0)))
27|#
28
29(LISP-UNIT:DEFINE-TEST DILOGARITHM
30  (LISP-UNIT::ASSERT-NUMERICAL-EQUAL
31   (LIST 1.6449340668482264d0 7.304974700020789d-16)
32   (MULTIPLE-VALUE-LIST (DILOGARITHM 1.0d0)))
33  (LISP-UNIT::ASSERT-NUMERICAL-EQUAL
34   (LIST #C(-0.20561675835602822d0 0.915965594177219d0)
35         #C(2.100180226255977d-15 7.618282373747058d-16))
36   (MULTIPLE-VALUE-LIST (DILOGARITHM #C(0.0d0 1.0d0)))))
37
Note: See TracBrowser for help on using the browser.