Changeset fe8cffb5ee8e7161addf7586ecaee00682c6bf1b
 Timestamp:
 03/22/12 22:58:43 (2 years ago)
 Author:
 Raymond Toy <toy.raymond@…>
 Children:
 4c1ed0f45e79bbe467f7d4694f417ff92ae46adb, bc851c79e6fffe06c4383142bc2dfeb154fbde14
 Parents:
 e10e402d446339130042607357b0129b35a1faa7
 gitcommitter:
 Raymond Toy <toy.raymond@…> (03/22/12 22:58:43)
 Message:

Clean up implemenation of sexpintegrale a bit.
 Files:

Legend:
 Unmodified
 Added
 Removed

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   for term = 1 then (* term (/ z k)) 
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   when (< (abs term) (* (abs sum) eps)) 
511   return sum))) 
 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)) 