Changeset 015558
 Timestamp:
 04/08/12 06:28:08 (3 years ago)
 Branches:
 master
 Children:
 c86217
 Parents:
 a5a4c7
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

qdgamma.lisp
rfe8cff r015558 258 258 ;; result is greater than 1. 259 259 #+nil 260 (defun erf (z)260 (defun cferf (z) 261 261 (let* ((z2 (* z z)) 262 262 (twoz2 (* 2 z2))) … … 505 505 (loop for k from 0 506 506 for term = 1 then (* term (/ z k)) 507 for sum = (/ ( 1 v)) then (+ sum (let ((denom ( k n1))) 508 (if (zerop denom) 509 0 510 (/ term denom)))) 507 for sum = (if (zerop n1) 508 0 509 (/ ( 1 v))) 510 then (+ sum (let ((denom ( k n1))) 511 (if (zerop denom) 512 0 513 (/ term denom)))) 511 514 when (< (abs term) (* (abs sum) eps)) 512 515 return sum)))
Note: See TracChangeset
for help on using the changeset viewer.