Changeset fe8cff for qdgamma.lisp
 Timestamp:
 03/23/12 05:58:43 (3 years ago)
 Branches:
 master
 Children:
 4c1ed0, b1d9be
 Parents:
 e10e40
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

qdgamma.lisp
re10e40 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 505 (loop for k from 0 505 506 for sum = (/ ( 1 v)) then (+ sum (let ((denom ( + k 1 ( n))))506 for term = 1 then (* term (/ z k)) 507 for sum = (/ ( 1 v)) then (+ sum (let ((denom ( k n1))) 507 508 (if (zerop denom) 508 509 0 509 (/ term (+ k 1 v)))))510 511 510 (/ term denom)))) 511 when (< (abs term) (* (abs sum) eps)) 512 return sum))) 512 513 (loop for k from 0 513 514 for term = 1 then (* term (/ z k))
Note: See TracChangeset
for help on using the changeset viewer.