(defun chint (a b c cint n) (declare (type double-float a)) (declare (type double-float b)) (declare (type (simple-array double-float (*)) c)) (declare (type (simple-array double-float (*)) cint)) (declare (type fixnum n)) (prog ((j 0) (fac 0.0d0) (sum 0.0d0) (con 0.0d0)) (declare (type fixnum j)) (declare (type double-float fac)) (declare (type double-float sum)) (declare (type double-float con)) (setf con (* 0.25 (+ b (- a)))) (setf sum 0.0) (setf fac 1.0) (fdo ((j 2 (+ j 1))) ((> j (+ n (- 1))) nil) (tagbody (fset (fref cint j) (/ (* con (+ (fref c (+ j (- 1))) (- (fref c (+ j 1))))) (+ j (- 1))) ) (setf sum (+ sum (* fac (fref cint j)))) (setf fac (- fac)) )) (fset (fref cint n) (/ (* con (fref c (+ n (- 1)))) (+ n (- 1)))) (setf sum (+ sum (* fac (fref cint n)))) (fset (fref cint 1) (* 2.0 sum)) (return (values a b c cint n)) ))