Skip to content
Snippets Groups Projects
Commit 1497683b authored by liam's avatar liam
Browse files

Count number array elements for return correctly.

git-svn-id: svn+ssh://pop/opt/space/mathematics/gsl/trunk@2984 a3d8a0fb-c1db-0310-ace7-a616afeb9e30
parent 35c3ec1f
No related branches found
No related tags found
No related merge requests found
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
; description: Macros to interface GSL functions. ; description: Macros to interface GSL functions.
; date: Mon Mar 6 2006 - 22:35 ; date: Mon Mar 6 2006 - 22:35
; author: Liam M. Healy ; author: Liam M. Healy
; modified: Sun Mar 19 2006 - 16:36 ; modified: Sun Mar 19 2006 - 16:47
;******************************************************** ;********************************************************
(in-package :gsl) (in-package :gsl)
...@@ -43,7 +43,7 @@ and a scaling exponent e10, such that the value is val*10^e10." ...@@ -43,7 +43,7 @@ and a scaling exponent e10, such that the value is val*10^e10."
(defun pick-result (decl) (defun pick-result (decl)
(if (listp (second decl)) (if (listp (second decl))
`((loop for i from 0 to ,(second (second decl)) `((loop for i from 0 below ,(second (second decl))
collect (cffi:mem-aref ,(first decl) ,(first (second decl)) i))) collect (cffi:mem-aref ,(first decl) ,(first (second decl)) i)))
(case (second decl) (case (second decl)
(sf-result (sf-result
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
; description: Bessel functions ; description: Bessel functions
; date: Fri Mar 17 2006 - 18:42 ; date: Fri Mar 17 2006 - 18:42
; author: Liam M. Healy ; author: Liam M. Healy
; modified: Sat Mar 18 2006 - 22:57 ; modified: Sun Mar 19 2006 - 16:53
;******************************************************** ;********************************************************
(in-package :gsl) (in-package :gsl)
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
"gsl_sf_bessel_Jn_array" "gsl_sf_bessel_Jn_array"
:documentation :documentation
"The values of the regular cylindrical Bessel functions @math{J_n(x)} for @math{n} from @var{nmin} to @var{nmax} inclusive. The values are computed using recurrence relations for efficiency, and therefore may differ slightly from the exact values." "The values of the regular cylindrical Bessel functions @math{J_n(x)} for @math{n} from @var{nmin} to @var{nmax} inclusive. The values are computed using recurrence relations for efficiency, and therefore may differ slightly from the exact values."
:return ((:double (- nmax nmin)))) :return ((:double (1+ (- nmax nmin)))))
;;;;**************************************************************************** ;;;;****************************************************************************
;;;; Irregular Cylindrical Bessel Functions ;;;; Irregular Cylindrical Bessel Functions
...@@ -65,7 +65,7 @@ ...@@ -65,7 +65,7 @@
"gsl_sf_bessel_Yn_array" "gsl_sf_bessel_Yn_array"
:documentation :documentation
"The values of the irregular cylindrical Bessel functions @math{Y_n(x)} for @math{n} from @var{nmin} to @var{nmax} inclusive. The values are computed using recurrence relations for efficiency, and therefore may differ slightly from the exact values." "The values of the irregular cylindrical Bessel functions @math{Y_n(x)} for @math{n} from @var{nmin} to @var{nmax} inclusive. The values are computed using recurrence relations for efficiency, and therefore may differ slightly from the exact values."
:return ((:double (- nmax nmin)))) :return ((:double (1+ (- nmax nmin)))))
;;;;**************************************************************************** ;;;;****************************************************************************
;;;; Regular Modified Cylindrical Bessel Functions ;;;; Regular Modified Cylindrical Bessel Functions
...@@ -93,7 +93,7 @@ ...@@ -93,7 +93,7 @@
"gsl_sf_bessel_In_array" "gsl_sf_bessel_In_array"
:documentation :documentation
"The values of the regular modified cylindrical Bessel functions @math{I_n(x)} for @math{n} from @var{nmin} to @var{nmax} inclusive. The values are computed using recurrence relations for efficiency, and therefore may differ slightly from the exact values." "The values of the regular modified cylindrical Bessel functions @math{I_n(x)} for @math{n} from @var{nmin} to @var{nmax} inclusive. The values are computed using recurrence relations for efficiency, and therefore may differ slightly from the exact values."
:return ((:double (- nmax nmin)))) :return ((:double (1+ (- nmax nmin)))))
(defun-sf cylindrical-bessel-I0-scaled ((x :double)) (defun-sf cylindrical-bessel-I0-scaled ((x :double))
"gsl_sf_bessel_I0_scaled_e" "gsl_sf_bessel_I0_scaled_e"
...@@ -118,7 +118,7 @@ ...@@ -118,7 +118,7 @@
:documentation :documentation
;; Bug in original documentation? doesn't say "modified" ;; Bug in original documentation? doesn't say "modified"
"The values of the scaled regular modified cylindrical Bessel functions @math{I_n(x)} for @math{n} from @var{nmin} to @var{nmax} inclusive. The values are computed using recurrence relations for efficiency, and therefore may differ slightly from the exact values." "The values of the scaled regular modified cylindrical Bessel functions @math{I_n(x)} for @math{n} from @var{nmin} to @var{nmax} inclusive. The values are computed using recurrence relations for efficiency, and therefore may differ slightly from the exact values."
:return ((:double (- nmax nmin)))) :return ((:double (1+ (- nmax nmin)))))
;;;;**************************************************************************** ;;;;****************************************************************************
;;;; Irregular Modified Cylindrical Bessel Functions ;;;; Irregular Modified Cylindrical Bessel Functions
...@@ -146,7 +146,7 @@ ...@@ -146,7 +146,7 @@
"gsl_sf_bessel_Kn_array" "gsl_sf_bessel_Kn_array"
:documentation :documentation
"The values of the irregular modified cylindrical Bessel functions @math{K_n(x)} for @math{n} from @var{nmin} to @var{nmax} inclusive. The values are computed using recurrence relations for efficiency, and therefore may differ slightly from the exact values." "The values of the irregular modified cylindrical Bessel functions @math{K_n(x)} for @math{n} from @var{nmin} to @var{nmax} inclusive. The values are computed using recurrence relations for efficiency, and therefore may differ slightly from the exact values."
:return ((:double (- nmax nmin)))) :return ((:double (1+ (- nmax nmin)))))
(defun-sf cylindrical-bessel-K0-scaled ((x :double)) (defun-sf cylindrical-bessel-K0-scaled ((x :double))
"gsl_sf_bessel_K0_scaled_e" "gsl_sf_bessel_K0_scaled_e"
...@@ -171,7 +171,7 @@ ...@@ -171,7 +171,7 @@
:documentation :documentation
;; Bug in original documentation? doesn't say "modified" ;; Bug in original documentation? doesn't say "modified"
"The values of the scaled irregular modified cylindrical Bessel functions @math{K_n(x)} for @math{n} from @var{nmin} to @var{nmax} inclusive. The values are computed using recurrence relations for efficiency, and therefore may differ slightly from the exact values." "The values of the scaled irregular modified cylindrical Bessel functions @math{K_n(x)} for @math{n} from @var{nmin} to @var{nmax} inclusive. The values are computed using recurrence relations for efficiency, and therefore may differ slightly from the exact values."
:return ((:double (- nmax nmin)))) :return ((:double (1+ (- nmax nmin)))))
;;;;**************************************************************************** ;;;;****************************************************************************
;;;; Regular Spherical Bessel Functions ;;;; Regular Spherical Bessel Functions
...@@ -204,13 +204,13 @@ ...@@ -204,13 +204,13 @@
"gsl_sf_bessel_jl_array" "gsl_sf_bessel_jl_array"
:documentation :documentation
"The regular spherical Bessel functions @math{j_l(x)} for @math{l} from 0 to @var{lmax} inclusive for @c{$lmax \geq 0$} @math{lmax >= 0} and @c{$x \geq 0$} @math{x >= 0}, storing the results in the array @var{result_array}. The values are computed using recurrence relations for efficiency, and therefore may differ slightly from the exact values." "The regular spherical Bessel functions @math{j_l(x)} for @math{l} from 0 to @var{lmax} inclusive for @c{$lmax \geq 0$} @math{lmax >= 0} and @c{$x \geq 0$} @math{x >= 0}, storing the results in the array @var{result_array}. The values are computed using recurrence relations for efficiency, and therefore may differ slightly from the exact values."
:return ((:double lmax))) :return ((:double (1+ lmax))))
(defun-sf spherical-bessel-jl-steed-array ((lmax :int) (x :double)) (defun-sf spherical-bessel-jl-steed-array ((lmax :int) (x :double))
"gsl_sf_bessel_jl_array" "gsl_sf_bessel_jl_array"
:documentation :documentation
"Uses Steed's method to compute the values of the regular spherical Bessel functions @math{j_l(x)} for @math{l} from 0 to @var{lmax} inclusive for @c{$lmax \geq 0$} @math{lmax >= 0} and @c{$x \geq 0$} @math{x >= 0}, storing the results in the array @var{result_array}. The Steed/Barnett algorithm is described in @cite{Comp. Phys. Comm.} 21, 297 (1981). Steed's method is more stable than the recurrence used in the other functions but is also slower." "Uses Steed's method to compute the values of the regular spherical Bessel functions @math{j_l(x)} for @math{l} from 0 to @var{lmax} inclusive for @c{$lmax \geq 0$} @math{lmax >= 0} and @c{$x \geq 0$} @math{x >= 0}, storing the results in the array @var{result_array}. The Steed/Barnett algorithm is described in @cite{Comp. Phys. Comm.} 21, 297 (1981). Steed's method is more stable than the recurrence used in the other functions but is also slower."
:return ((:double lmax))) :return ((:double (1+ lmax))))
;;;;**************************************************************************** ;;;;****************************************************************************
;;;; Irregular Spherical Bessel Functions ;;;; Irregular Spherical Bessel Functions
...@@ -244,7 +244,7 @@ ...@@ -244,7 +244,7 @@
"gsl_sf_bessel_yl_array" "gsl_sf_bessel_yl_array"
:documentation :documentation
"The irregular spherical Bessel functions @math{y_l(x)} for @math{l} from 0 to @var{lmax} inclusive for @c{$lmax \geq 0$} @math{lmax >= 0}, storing the results in the array @var{result_array}. The values are computed using recurrence relations for efficiency, and therefore may differ slightly from the exact values." "The irregular spherical Bessel functions @math{y_l(x)} for @math{l} from 0 to @var{lmax} inclusive for @c{$lmax \geq 0$} @math{lmax >= 0}, storing the results in the array @var{result_array}. The values are computed using recurrence relations for efficiency, and therefore may differ slightly from the exact values."
:return ((:double lmax))) :return ((:double (1+ lmax))))
;;;;**************************************************************************** ;;;;****************************************************************************
;;;; Regular Modified Spherical Bessel Functions ;;;; Regular Modified Spherical Bessel Functions
...@@ -278,7 +278,7 @@ ...@@ -278,7 +278,7 @@
"gsl_sf_bessel_il_scaled_array" "gsl_sf_bessel_il_scaled_array"
:documentation :documentation
"The values of the scaled regular modified cylindrical Bessel functions @math{\exp(-|x|) i_l(x)} for @math{l} from 0 to @var{lmax} inclusive for @c{$lmax \geq 0$} @math{lmax >= 0}, storing the results in the array @var{result_array}. The values are computed using recurrence relations for efficiency, and therefore may differ slightly from the exact values." "The values of the scaled regular modified cylindrical Bessel functions @math{\exp(-|x|) i_l(x)} for @math{l} from 0 to @var{lmax} inclusive for @c{$lmax \geq 0$} @math{lmax >= 0}, storing the results in the array @var{result_array}. The values are computed using recurrence relations for efficiency, and therefore may differ slightly from the exact values."
:return ((:double lmax))) :return ((:double (1+ lmax))))
;;;;**************************************************************************** ;;;;****************************************************************************
;;;; Irregular Modified Spherical Bessel Functions ;;;; Irregular Modified Spherical Bessel Functions
...@@ -312,7 +312,7 @@ ...@@ -312,7 +312,7 @@
"gsl_sf_bessel_kl_scaled_array" "gsl_sf_bessel_kl_scaled_array"
:documentation :documentation
"The values of the scaled irregular modified spherical Bessel functions @math{\exp(x) k_l(x)} for @math{l} from 0 to @var{lmax} inclusive for @c{$lmax \geq 0$} @math{lmax >= 0} and @math{x>0}, storing the results in the array @var{result_array}. The values are computed using recurrence relations for efficiency, and therefore may differ slightly from the exact values." "The values of the scaled irregular modified spherical Bessel functions @math{\exp(x) k_l(x)} for @math{l} from 0 to @var{lmax} inclusive for @c{$lmax \geq 0$} @math{lmax >= 0} and @math{x>0}, storing the results in the array @var{result_array}. The values are computed using recurrence relations for efficiency, and therefore may differ slightly from the exact values."
:return ((:double lmax))) :return ((:double (1+ lmax))))
;;;;**************************************************************************** ;;;;****************************************************************************
;;;; Regular Bessel Function - Fractional Order ;;;; Regular Bessel Function - Fractional Order
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment