Changeset bc851c for qdgamma.lisp
 Timestamp:
 03/23/12 15:38:53 (3 years ago)
 Branches:
 master
 Children:
 efbf11
 Parents:
 6162b30bff1a78bcf7757476e8b05346af85f0e2 (diff), fe8cff (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.  File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

qdgamma.lisp
r4b332e rfe8cff 498 498 (= v (ftruncate v))) 499 499 ;; v is an integer 500 (let ((n (truncate v))) 501 ( (* (/ (expt z ( v 1)) 500 (let* ((n (truncate v)) 501 (n1 (1 n))) 502 ( (* (/ (expt z n1) 502 503 (gamma v)) 503 504 ( (psi v) (log z))) 504 (loop for k from 0 below n505 (loop for k from 0 505 506 for term = 1 then (* term (/ z k)) 506 for sum = (/ ( 1 v)) then (+ sum (/ term (+ k 1 v))) 507 when (< (abs term) (* (abs sum) eps)) 508 return sum) 509 (loop for k from n 510 for term = 1 then (* term (/ z k)) 511 for sum = 0 then (+ sum (/ term (+ k 1 v))) 507 for sum = (/ ( 1 v)) then (+ sum (let ((denom ( k n1))) 508 (if (zerop denom) 509 0 510 (/ term denom)))) 512 511 when (< (abs term) (* (abs sum) eps)) 513 512 return sum))) … … 528 527 ;; 529 528 ;; 530 (cond ((< (abs z) 1) 529 (cond ((and (realp v) (minusp v)) 530 ;; E(v, z) = z^(v1)*incomplete_gamma_tail(v+1,z) 531 (let ((v ( v))) 532 (* (expt z ( v 1)) 533 (incompletegammatail (+ v 1) z)))) 534 ((< (abs z) 1) 531 535 ;; Use series for small z 532 536 (sexpintegrale v z))
Note: See TracChangeset
for help on using the changeset viewer.