|
Revision 26, 1.3 kB
(checked in by lhealy, 9 months ago)
|
|
Subversion version stamp.
|
-
Property svn:keywords set to
Id
|
| Line | |
|---|
| 1 | ;; Structures returned by special functions. |
|---|
| 2 | ;; Liam Healy, Mon Jan 1 2007 - 11:35 |
|---|
| 3 | ;; Time-stamp: <2008-02-16 22:45:31EST return-structures.lisp> |
|---|
| 4 | ;; $Id$ |
|---|
| 5 | |
|---|
| 6 | (in-package :gsl) |
|---|
| 7 | |
|---|
| 8 | ;;;;**************************************************************************** |
|---|
| 9 | ;;;; Result from special functions |
|---|
| 10 | ;;;;**************************************************************************** |
|---|
| 11 | |
|---|
| 12 | (cffi:defcstruct sf-result |
|---|
| 13 | "Results from special functions with value and error estimate." |
|---|
| 14 | ;; file:///usr/share/doc/gsl-ref-html/gsl-ref_7.html#SEC61 |
|---|
| 15 | (val :double) |
|---|
| 16 | (err :double)) |
|---|
| 17 | |
|---|
| 18 | (cffi:defcstruct sf-result-e10 |
|---|
| 19 | "Results from special functions with value, error estimate |
|---|
| 20 | and a scaling exponent e10, such that the value is val*10^e10." |
|---|
| 21 | ;; file:///usr/share/doc/gsl-ref-html/gsl-ref_7.html#SEC61 |
|---|
| 22 | (val :double) |
|---|
| 23 | (err :double) |
|---|
| 24 | (e10 :int)) |
|---|
| 25 | |
|---|
| 26 | (cffi:defcenum sf-mode |
|---|
| 27 | "Numerical precision modes with which to calculate special functions." |
|---|
| 28 | ;; file:///usr/share/doc/gsl-ref-html/gsl-ref_7.html#SEC62 |
|---|
| 29 | :double-prec |
|---|
| 30 | :single-prec |
|---|
| 31 | :approx-prec) |
|---|
| 32 | |
|---|
| 33 | (defun val (sf-result &optional (type 'sf-result)) |
|---|
| 34 | (cffi:foreign-slot-value sf-result type 'val)) |
|---|
| 35 | |
|---|
| 36 | (defun err (sf-result &optional (type 'sf-result)) |
|---|
| 37 | (cffi:foreign-slot-value sf-result type 'err)) |
|---|
| 38 | |
|---|
| 39 | (defun e10 (sf-result) |
|---|
| 40 | (cffi:foreign-slot-value sf-result 'sf-result-e10 'e10)) |
|---|
| 41 | |
|---|