Changeset 78801d
 Timestamp:
 04/15/12 17:50:16 (3 years ago)
 Branches:
 master
 Children:
 8c5195, b1d9be
 Parents:
 5566bc
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

qdbessel.lisp
r235ac2 r78801d 180 180 181 181 182 ;; 182 ;; Not really just for Bessel J for integer orders, but in that case, 183 ;; this is all that's needed to compute Bessel J. For other values, 184 ;; this is just part of the computation needed. 185 ;; 186 ;; Compute 187 ;; 188 ;; 1/(2*%pi) * (exp(%i*v*%pi/2) * I(%i*z, v) + exp(%i*v*%pi/2) * I(%i*z, v)) 183 189 (defun integerbesseljexparc (v z) 184 190 (let* ((iz (* #c(0 1) z)) … … 258 264 ;; sum(exp(k*z)*a[n](k,v), k, 1, N) 259 265 ;; 266 #+nil 260 267 (defun suman (bign n v z) 261 268 (let ((sum 0)) … … 265 272 (an n k v)))) 266 273 sum)) 274 275 ;; Like above, but we just stop when the terms no longer contribute to 276 ;; the sum. 277 (defun suman (bign n v z) 278 (let ((eps (epsilon (realpart z)))) 279 (do* ((k 1 (+ 1 k)) 280 (term (* (exp ( (* k z))) 281 (an n k v)) 282 (* (exp ( (* k z))) 283 (an n k v))) 284 (sum term (+ sum term))) 285 ((or (<= (abs term) (* eps (abs sum))) 286 (> k bign)) 287 sum)))) 267 288 268 289 ;; SUMAB computes the series … … 400 421 (t 401 422 ;; Need to finetune the value of bign. 402 (let ((bign 10 0)423 (let ((bign 10) 403 424 (vpi (* v (floatpi (realpart z))))) 404 425 (+ (integerbesseljexparc v z)
Note: See TracChangeset
for help on using the changeset viewer.