Commit 3373bd8e by Raymond Toy

### Rename alpha (beta) to bessel-alpha (bessel-beta)

```Prevent confusion that `BETA` is the beta function.  While we're at it
rename `ALPHA` too, along with the `FOO-ITER` versions.```
parent e61d3612
Pipeline #2210 passed with stage
in 2 minutes and 31 seconds
 ... ... @@ -263,12 +263,12 @@ ;; alpha[n](z) = G(n+1,z/2)/z^(n+1) ;; beta[n](z) = G(n+1,z/2)/z^(n+1) - G(n+1,-z/2)/z^(n+1) (defun alpha (n z) (defun bessel-alpha (n z) (let ((n (float n (realpart z)))) (/ (incomplete-gamma-lower (1+ n) (/ z 2)) (expt z (1+ n))))) (defun alpha-iter (n z alpha-old) (defun bessel-alpha-iter (n z alpha-old) (if (zerop n) ;; (1- exp(-z/2))/z. (/ (- 1 (exp (* z -1/2))) ... ... @@ -278,13 +278,13 @@ z (ash 1 n))))) (defun beta (n z) (defun bessel-beta (n z) (let ((n (float n (realpart z)))) (/ (- (incomplete-gamma-lower (1+ n) (/ z 2)) (incomplete-gamma-lower (1+ n) (/ z -2))) (expt z (1+ n))))) (defun beta-iter (n z old-beta) (defun bessel-beta-iter (n z old-beta) (if (zerop n) ;; integrate(exp(-z*s),s,-1/2,1/2) ;; = (exp(z/2)-exp(-z/2)/z ... ... @@ -360,10 +360,10 @@ (let ((eps (epsilon (realpart z)))) (an-clrhash) (do* ((n 0 (+ 1 n)) (term (+ (* (alpha n z) (an n 0 v)) (* (beta n z) (sum-an big-n n v z))) (+ (* (alpha n z) (an n 0 v)) (* (beta n z) (sum-an big-n n v z)))) (term (+ (* (bessel-alpha n z) (an n 0 v)) (* (bessel-beta n z) (sum-an big-n n v z))) (+ (* (bessel-alpha n z) (an n 0 v)) (* (bessel-beta n z) (sum-an big-n n v z)))) (sum term (+ sum term))) ((<= (abs term) (* eps (abs sum))) sum) ... ... @@ -376,10 +376,10 @@ (let ((eps (epsilon (realpart z)))) (an-clrhash) (do* ((n 0 (+ 1 n)) (alphan (alpha-iter 0 z 0) (alpha-iter n z alphan)) (betan (beta-iter 0 z 0) (beta-iter n z betan)) (alphan (bessel-alpha-iter 0 z 0) (bessel-alpha-iter n z alphan)) (betan (bessel-beta-iter 0 z 0) (bessel-beta-iter n z betan)) (term (+ (* alphan (an n 0 v)) (* betan (sum-an big-n n v z))) (+ (* alphan (an n 0 v)) ... ...
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!