1 ;;; Compiled by f2cl version:
2 ;;; ("f2cl1.l,v 46c1f6a93b0d 2012/05/03 04:40:28 toy $"
3 ;;; "f2cl2.l,v 96616d88fb7e 2008/02/22 22:19:34 rtoy $"
4 ;;; "f2cl3.l,v 96616d88fb7e 2008/02/22 22:19:34 rtoy $"
5 ;;; "f2cl4.l,v 96616d88fb7e 2008/02/22 22:19:34 rtoy $"
6 ;;; "f2cl5.l,v 46c1f6a93b0d 2012/05/03 04:40:28 toy $"
7 ;;; "f2cl6.l,v 1d5cbacbb977 2008/08/24 00:56:27 rtoy $"
8 ;;; "macros.l,v fceac530ef0c 2011/11/26 04:02:26 toy $")
10 ;;; Using Lisp CMU Common Lisp snapshot-2012-04 (20C Unicode)
12 ;;; Options: ((:prune-labels nil) (:auto-save t) (:relaxed-array-decls t)
13 ;;; (:coerce-assigns :as-needed) (:array-type ':array)
14 ;;; (:array-slicing t) (:declare-common nil)
15 ;;; (:float-format double-float))
21 (f a b epsabs epsrel key limit result abserr neval ier alist blist rlist
23 (declare (type (array f2cl-lib
:integer4
(*)) iord
)
24 (type (array double-float
(*)) elist rlist blist alist
)
25 (type (f2cl-lib:integer4
) last$ ier neval limit key
)
26 (type (double-float) abserr result epsrel epsabs b a
))
27 (f2cl-lib:with-multi-array-data
28 ((alist double-float alist-%data% alist-%offset%
)
29 (blist double-float blist-%data% blist-%offset%
)
30 (rlist double-float rlist-%data% rlist-%offset%
)
31 (elist double-float elist-%data% elist-%offset%
)
32 (iord f2cl-lib
:integer4 iord-%data% iord-%offset%
))
33 (prog ((iroff1 0) (iroff2 0) (k 0) (keyf 0) (maxerr 0) (nrmax 0) (area 0.0)
34 (area1 0.0) (area12 0.0) (area2 0.0) (a1 0.0) (a2 0.0) (b1 0.0)
35 (b2 0.0) (defabs 0.0) (defab1 0.0) (defab2 0.0) (epmach 0.0)
36 (errbnd 0.0) (errmax 0.0) (error1 0.0) (error2 0.0) (erro12 0.0)
37 (errsum 0.0) (resabs 0.0) (uflow 0.0))
38 (declare (type (double-float) uflow resabs errsum erro12 error2 error1
39 errmax errbnd epmach defab2 defab1 defabs
40 b2 b1 a2 a1 area2 area12 area1 area
)
41 (type (f2cl-lib:integer4
) nrmax maxerr keyf k iroff2 iroff1
))
42 (setf epmach
(f2cl-lib:d1mach
4))
43 (setf uflow
(f2cl-lib:d1mach
1))
49 (setf (f2cl-lib:fref alist-%data%
(1) ((1 *)) alist-%offset%
) a
)
50 (setf (f2cl-lib:fref blist-%data%
(1) ((1 *)) blist-%offset%
) b
)
51 (setf (f2cl-lib:fref rlist-%data%
(1) ((1 *)) rlist-%offset%
) 0.0)
52 (setf (f2cl-lib:fref elist-%data%
(1) ((1 *)) elist-%offset%
) 0.0)
53 (setf (f2cl-lib:fref iord-%data%
(1) ((1 *)) iord-%offset%
) 0)
54 (if (and (<= epsabs
0.0) (< epsrel
(max (* 50.0 epmach
) 5.0e-29)))
56 (if (= ier
6) (go label999
))
58 (if (<= key
0) (setf keyf
1))
59 (if (>= key
7) (setf keyf
6))
62 (multiple-value-bind (var-0 var-1 var-2 var-3 var-4 var-5 var-6
)
63 (dqk15 f a b result abserr defabs resabs
)
64 (declare (ignore var-0 var-1 var-2
))
70 (multiple-value-bind (var-0 var-1 var-2 var-3 var-4 var-5 var-6
)
71 (dqk21 f a b result abserr defabs resabs
)
72 (declare (ignore var-0 var-1 var-2
))
78 (multiple-value-bind (var-0 var-1 var-2 var-3 var-4 var-5 var-6
)
79 (dqk31 f a b result abserr defabs resabs
)
80 (declare (ignore var-0 var-1 var-2
))
86 (multiple-value-bind (var-0 var-1 var-2 var-3 var-4 var-5 var-6
)
87 (dqk41 f a b result abserr defabs resabs
)
88 (declare (ignore var-0 var-1 var-2
))
94 (multiple-value-bind (var-0 var-1 var-2 var-3 var-4 var-5 var-6
)
95 (dqk51 f a b result abserr defabs resabs
)
96 (declare (ignore var-0 var-1 var-2
))
100 (setf resabs var-6
)))
102 (multiple-value-bind (var-0 var-1 var-2 var-3 var-4 var-5 var-6
)
103 (dqk61 f a b result abserr defabs resabs
)
104 (declare (ignore var-0 var-1 var-2
))
108 (setf resabs var-6
)))
110 (setf (f2cl-lib:fref rlist-%data%
(1) ((1 *)) rlist-%offset%
) result
)
111 (setf (f2cl-lib:fref elist-%data%
(1) ((1 *)) elist-%offset%
) abserr
)
112 (setf (f2cl-lib:fref iord-%data%
(1) ((1 *)) iord-%offset%
) 1)
113 (setf errbnd
(max epsabs
(* epsrel
(abs result
))))
114 (if (and (<= abserr
(* 50.0 epmach defabs
)) (> abserr errbnd
))
116 (if (= limit
1) (setf ier
1))
119 (and (<= abserr errbnd
) (/= abserr resabs
))
129 (f2cl-lib:fdo
(last$
2 (f2cl-lib:int-add last$
1))
130 ((> last$ limit
) nil
)
133 (f2cl-lib:fref alist-%data%
(maxerr) ((1 *)) alist-%offset%
))
137 (f2cl-lib:fref alist-%data%
141 (f2cl-lib:fref blist-%data%
147 (f2cl-lib:fref blist-%data%
(maxerr) ((1 *)) blist-%offset%
))
149 (multiple-value-bind (var-0 var-1 var-2 var-3 var-4 var-5 var-6
)
150 (dqk15 f a1 b1 area1 error1 resabs defab1
)
151 (declare (ignore var-0 var-1 var-2
))
155 (setf defab1 var-6
)))
157 (multiple-value-bind (var-0 var-1 var-2 var-3 var-4 var-5 var-6
)
158 (dqk21 f a1 b1 area1 error1 resabs defab1
)
159 (declare (ignore var-0 var-1 var-2
))
163 (setf defab1 var-6
)))
165 (multiple-value-bind (var-0 var-1 var-2 var-3 var-4 var-5 var-6
)
166 (dqk31 f a1 b1 area1 error1 resabs defab1
)
167 (declare (ignore var-0 var-1 var-2
))
171 (setf defab1 var-6
)))
173 (multiple-value-bind (var-0 var-1 var-2 var-3 var-4 var-5 var-6
)
174 (dqk41 f a1 b1 area1 error1 resabs defab1
)
175 (declare (ignore var-0 var-1 var-2
))
179 (setf defab1 var-6
)))
181 (multiple-value-bind (var-0 var-1 var-2 var-3 var-4 var-5 var-6
)
182 (dqk51 f a1 b1 area1 error1 resabs defab1
)
183 (declare (ignore var-0 var-1 var-2
))
187 (setf defab1 var-6
)))
189 (multiple-value-bind (var-0 var-1 var-2 var-3 var-4 var-5 var-6
)
190 (dqk61 f a1 b1 area1 error1 resabs defab1
)
191 (declare (ignore var-0 var-1 var-2
))
195 (setf defab1 var-6
)))
197 (multiple-value-bind (var-0 var-1 var-2 var-3 var-4 var-5 var-6
)
198 (dqk15 f a2 b2 area2 error2 resabs defab2
)
199 (declare (ignore var-0 var-1 var-2
))
203 (setf defab2 var-6
)))
205 (multiple-value-bind (var-0 var-1 var-2 var-3 var-4 var-5 var-6
)
206 (dqk21 f a2 b2 area2 error2 resabs defab2
)
207 (declare (ignore var-0 var-1 var-2
))
211 (setf defab2 var-6
)))
213 (multiple-value-bind (var-0 var-1 var-2 var-3 var-4 var-5 var-6
)
214 (dqk31 f a2 b2 area2 error2 resabs defab2
)
215 (declare (ignore var-0 var-1 var-2
))
219 (setf defab2 var-6
)))
221 (multiple-value-bind (var-0 var-1 var-2 var-3 var-4 var-5 var-6
)
222 (dqk41 f a2 b2 area2 error2 resabs defab2
)
223 (declare (ignore var-0 var-1 var-2
))
227 (setf defab2 var-6
)))
229 (multiple-value-bind (var-0 var-1 var-2 var-3 var-4 var-5 var-6
)
230 (dqk51 f a2 b2 area2 error2 resabs defab2
)
231 (declare (ignore var-0 var-1 var-2
))
235 (setf defab2 var-6
)))
237 (multiple-value-bind (var-0 var-1 var-2 var-3 var-4 var-5 var-6
)
238 (dqk61 f a2 b2 area2 error2 resabs defab2
)
239 (declare (ignore var-0 var-1 var-2
))
243 (setf defab2 var-6
)))
244 (setf neval
(f2cl-lib:int-add neval
1))
245 (setf area12
(+ area1 area2
))
246 (setf erro12
(+ error1 error2
))
247 (setf errsum
(- (+ errsum erro12
) errmax
))
250 (f2cl-lib:fref rlist-%data%
254 (if (or (= defab1 error1
) (= defab2 error2
)) (go label5
))
259 (- (f2cl-lib:fref rlist-%data%
(maxerr) ((1 *)) rlist-%offset%
)
261 (* 1.0e-5 (abs area12
)))
262 (>= erro12
(* 0.99 errmax
)))
263 (setf iroff1
(f2cl-lib:int-add iroff1
1)))
264 (if (and (> last$
10) (> erro12 errmax
))
265 (setf iroff2
(f2cl-lib:int-add iroff2
1)))
267 (setf (f2cl-lib:fref rlist-%data%
(maxerr) ((1 *)) rlist-%offset%
)
269 (setf (f2cl-lib:fref rlist-%data%
(last$
) ((1 *)) rlist-%offset%
)
271 (setf errbnd
(max epsabs
(* epsrel
(abs area
))))
272 (if (<= errsum errbnd
) (go label8
))
273 (if (or (>= iroff1
6) (>= iroff2
20)) (setf ier
2))
274 (if (= last$ limit
) (setf ier
1))
276 (<= (max (abs a1
) (abs b2
))
277 (* (+ 1.0 (* 100.0 epmach
)) (+ (abs a2
) (* 1000.0 uflow
))))
280 (if (> error2 error1
) (go label10
))
281 (setf (f2cl-lib:fref alist-%data%
(last$
) ((1 *)) alist-%offset%
) a2
)
282 (setf (f2cl-lib:fref blist-%data%
(maxerr) ((1 *)) blist-%offset%
)
284 (setf (f2cl-lib:fref blist-%data%
(last$
) ((1 *)) blist-%offset%
) b2
)
285 (setf (f2cl-lib:fref elist-%data%
(maxerr) ((1 *)) elist-%offset%
)
287 (setf (f2cl-lib:fref elist-%data%
(last$
) ((1 *)) elist-%offset%
)
291 (setf (f2cl-lib:fref alist-%data%
(maxerr) ((1 *)) alist-%offset%
)
293 (setf (f2cl-lib:fref alist-%data%
(last$
) ((1 *)) alist-%offset%
) a1
)
294 (setf (f2cl-lib:fref blist-%data%
(last$
) ((1 *)) blist-%offset%
) b1
)
295 (setf (f2cl-lib:fref rlist-%data%
(maxerr) ((1 *)) rlist-%offset%
)
297 (setf (f2cl-lib:fref rlist-%data%
(last$
) ((1 *)) rlist-%offset%
)
299 (setf (f2cl-lib:fref elist-%data%
(maxerr) ((1 *)) elist-%offset%
)
301 (setf (f2cl-lib:fref elist-%data%
(last$
) ((1 *)) elist-%offset%
)
304 (multiple-value-bind (var-0 var-1 var-2 var-3 var-4 var-5 var-6
)
305 (dqpsrt limit last$ maxerr errmax elist iord nrmax
)
306 (declare (ignore var-0 var-1 var-4 var-5
))
310 (if (or (/= ier
0) (<= errsum errbnd
)) (go label40
))
314 (f2cl-lib:fdo
(k 1 (f2cl-lib:int-add k
1))
319 (f2cl-lib:fref rlist-%data%
(k) ((1 *)) rlist-%offset%
)))
326 (f2cl-lib:int-add
(f2cl-lib:int-mul
10 keyf
) 1)
327 (f2cl-lib:int-add
(f2cl-lib:int-mul
2 neval
) 1))))
329 (setf neval
(f2cl-lib:int-add
(f2cl-lib:int-mul
30 neval
) 15)))
352 (in-package #:cl-user
)
353 #+#.
(cl:if
(cl:find-package
'#:f2cl
) '(and) '(or))
354 (eval-when (:load-toplevel
:compile-toplevel
:execute
)
355 (setf (gethash 'fortran-to-lisp
::dqage fortran-to-lisp
::*f2cl-function-info
*)
356 (fortran-to-lisp::make-f2cl-finfo
357 :arg-types
'(t (double-float) (double-float) (double-float)
358 (double-float) (fortran-to-lisp::integer4
)
359 (fortran-to-lisp::integer4
) (double-float)
360 (double-float) (fortran-to-lisp::integer4
)
361 (fortran-to-lisp::integer4
) (array double-float
(*))
362 (array double-float
(*)) (array double-float
(*))
363 (array double-float
(*))
364 (array fortran-to-lisp
::integer4
(*))
365 (fortran-to-lisp::integer4
))
366 :return-values
'(nil nil nil nil nil nil nil fortran-to-lisp
::result
367 fortran-to-lisp
::abserr fortran-to-lisp
::neval
368 fortran-to-lisp
::ier nil nil nil nil nil
369 fortran-to-lisp
::last$
)
370 :calls
'(fortran-to-lisp::dqpsrt fortran-to-lisp
::dqk61
371 fortran-to-lisp
::dqk51 fortran-to-lisp
::dqk41
372 fortran-to-lisp
::dqk31 fortran-to-lisp
::dqk21
373 fortran-to-lisp
::dqk15 fortran-to-lisp
::d1mach
))))