1 ;;; Compiled by f2cl version:
2 ;;; ("f2cl1.l,v 95098eb54f13 2013/04/01 00:45:16 toy $"
3 ;;; "f2cl2.l,v 95098eb54f13 2013/04/01 00:45:16 toy $"
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 95098eb54f13 2013/04/01 00:45:16 toy $"
7 ;;; "f2cl6.l,v 1d5cbacbb977 2008/08/24 00:56:27 rtoy $"
8 ;;; "macros.l,v 1409c1352feb 2013/03/24 20:44:50 toy $")
10 ;;; Using Lisp CMU Common Lisp snapshot-2020-04 (21D 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))
17 (in-package "HOMPACK")
21 (declare (type (f2cl-lib:integer4
20 20) limit
) (ignorable limit
))
23 (n nfe iflag relerr abserr y yp yold ypold a qr lenqr pivot work par
25 (declare (type (array f2cl-lib
:integer4
(*)) ipar
)
26 (type (array double-float
(*)) par
)
27 (type (array f2cl-lib
:integer4
(*)) pivot
)
28 (type (array double-float
(*)) work qr a ypold yold yp y
)
29 (type (double-float) abserr relerr
)
30 (type (f2cl-lib:integer4
) lenqr iflag nfe n
))
31 (f2cl-lib:with-multi-array-data
32 ((y double-float y-%data% y-%offset%
)
33 (yp double-float yp-%data% yp-%offset%
)
34 (yold double-float yold-%data% yold-%offset%
)
35 (ypold double-float ypold-%data% ypold-%offset%
)
36 (a double-float a-%data% a-%offset%
)
37 (qr double-float qr-%data% qr-%offset%
)
38 (work double-float work-%data% work-%offset%
)
39 (pivot f2cl-lib
:integer4 pivot-%data% pivot-%offset%
)
40 (par double-float par-%data% par-%offset%
)
41 (ipar f2cl-lib
:integer4 ipar-%data% ipar-%offset%
))
42 (labels ((dd01 (f0 f1 dels
)
43 (f2cl-lib:f2cl
/ (+ f1
(- f0
)) dels
))
44 (dd001 (f0 fp0 f1 dels
)
45 (/ (- (dd01 f0 f1 dels
) fp0
) dels
))
46 (dd011 (f0 f1 fp1 dels
)
47 (/ (- fp1
(dd01 f0 f1 dels
)) dels
))
48 (dd0011 (f0 fp0 f1 fp1 dels
)
49 (/ (- (dd011 f0 f1 fp1 dels
) (dd001 f0 fp0 f1 dels
)) dels
))
50 (qofs (f0 fp0 f1 fp1 dels s
)
55 (+ (* (dd0011 f0 fp0 f1 fp1 dels
) (- s dels
))
56 (dd001 f0 fp0 f1 dels
))
61 (declare (ftype (function (double-float double-float double-float
)
62 (values double-float
&rest t
))
64 (declare (ftype (function
65 (double-float double-float double-float double-float
)
66 (values double-float
&rest t
))
68 (declare (ftype (function
69 (double-float double-float double-float double-float
)
70 (values double-float
&rest t
))
72 (declare (ftype (function
73 (double-float double-float double-float double-float
75 (values double-float
&rest t
))
77 (declare (ftype (function
78 (double-float double-float double-float double-float
79 double-float double-float
)
80 (values double-float
&rest t
))
82 (prog ((ipp 0) (irho 0) (itangw 0) (itz 0) (iw 0) (iwp 0) (iz0 0)
83 (iz1 0) (judy 0) (jw 0) (lcode 0) (np1 0) (aerr 0.0) (dels 0.0)
84 (f0 0.0) (f1 0.0) (fp0 0.0) (fp1 0.0) (qsout 0.0) (rerr 0.0)
85 (s 0.0) (sa 0.0) (sb 0.0) (sout 0.0) (u 0.0))
86 (declare (type (f2cl-lib:integer4
) ipp irho itangw itz iw iwp iz0 iz1
88 (type (double-float) aerr dels f0 f1 fp0 fp1 qsout rerr s sa
90 (setf u
(f2cl-lib:d1mach
4))
91 (setf rerr
(max relerr u
))
92 (setf aerr
(max abserr
0.0))
93 (setf np1
(f2cl-lib:int-add n
1))
95 (setf irho
(f2cl-lib:int-add n
1))
96 (setf iw
(f2cl-lib:int-add irho n
))
97 (setf iwp
(f2cl-lib:int-add iw np1
))
98 (setf itz
(f2cl-lib:int-add iwp np1
))
99 (setf iz0
(f2cl-lib:int-add itz np1
))
100 (setf iz1
(f2cl-lib:int-add iz0 np1
))
101 (setf itangw
(f2cl-lib:int-add iz1 np1
))
103 (f2cl-lib:fdo
(judy 1 (f2cl-lib:int-add judy
1))
106 (f2cl-lib:fdo
(jw 1 (f2cl-lib:int-add jw
1))
109 (setf (f2cl-lib:fref work-%data%
111 (f2cl-lib:int-add itz jw
)
118 (f2cl-lib:int-mul
2 n
)
122 (f2cl-lib:fref y-%data%
124 ((1 (f2cl-lib:int-add n
1)))
126 (f2cl-lib:fref yold-%data%
128 ((1 (f2cl-lib:int-add n
1)))
133 (f2cl-lib:array-slice work-%data%
142 (f2cl-lib:int-mul
2 n
)
146 (setf sa
(coerce 0.0f0
'double-float
))
150 (multiple-value-bind (var-0 var-1 var-2 var-3 var-4 var-5 var-6
)
151 (root sout qsout sa sb rerr aerr lcode
)
152 (declare (ignore var-1 var-4 var-5
))
157 (if (> lcode
0) (go label140
))
161 (f2cl-lib:fref yold-%data%
163 ((1 (f2cl-lib:int-add n
1)))
165 (f2cl-lib:fref ypold-%data%
167 ((1 (f2cl-lib:int-add n
1)))
169 (f2cl-lib:fref y-%data%
171 ((1 (f2cl-lib:int-add n
1)))
173 (f2cl-lib:fref yp-%data%
175 ((1 (f2cl-lib:int-add n
1)))
185 (f2cl-lib:fdo
(jw 1 (f2cl-lib:int-add jw
1))
188 (setf (f2cl-lib:fref work-%data%
190 (f2cl-lib:int-add iw jw
)
197 (f2cl-lib:int-mul
2 n
)
201 (f2cl-lib:fref yold-%data%
203 ((1 (f2cl-lib:int-add n
1)))
205 (f2cl-lib:fref ypold-%data%
207 ((1 (f2cl-lib:int-add n
1)))
209 (f2cl-lib:fref y-%data%
211 ((1 (f2cl-lib:int-add n
1)))
213 (f2cl-lib:fref yp-%data%
215 ((1 (f2cl-lib:int-add n
1)))
220 (var-0 var-1 var-2 var-3 var-4 var-5 var-6 var-7 var-8
221 var-9 var-10 var-11 var-12 var-13 var-14 var-15 var-16
)
223 (f2cl-lib:array-slice work-%data%
232 (f2cl-lib:int-mul
2 n
)
235 (f2cl-lib:array-slice work-%data%
244 (f2cl-lib:int-mul
2 n
)
247 (f2cl-lib:array-slice work-%data%
256 (f2cl-lib:int-mul
2 n
)
259 ypold a qr lenqr pivot
260 (f2cl-lib:array-slice work-%data%
269 (f2cl-lib:int-mul
2 n
)
272 (f2cl-lib:array-slice work-%data%
281 (f2cl-lib:int-mul
2 n
)
284 (f2cl-lib:array-slice work-%data%
293 (f2cl-lib:int-mul
2 n
)
296 nfe n iflag par ipar
)
297 (declare (ignore var-1 var-2 var-3 var-4 var-5 var-6 var-7
298 var-8 var-9 var-10 var-11 var-13 var-15
303 (if (> iflag
0) (go end_label
))
305 (f2cl-lib:array-slice work-%data%
313 (f2cl-lib:int-mul
2 n
)
317 (f2cl-lib:array-slice work-%data%
325 (f2cl-lib:int-mul
2 n
)
330 (var-0 var-1 var-2 var-3 var-4 var-5 var-6 var-7 var-8
331 var-9 var-10 var-11 var-12 var-13 var-14 var-15 var-16
)
333 (f2cl-lib:array-slice work-%data%
342 (f2cl-lib:int-mul
2 n
)
345 (f2cl-lib:array-slice work-%data%
354 (f2cl-lib:int-mul
2 n
)
357 (f2cl-lib:array-slice work-%data%
366 (f2cl-lib:int-mul
2 n
)
369 ypold a qr lenqr pivot
370 (f2cl-lib:array-slice work-%data%
379 (f2cl-lib:int-mul
2 n
)
382 (f2cl-lib:array-slice work-%data%
391 (f2cl-lib:int-mul
2 n
)
394 (f2cl-lib:array-slice work-%data%
403 (f2cl-lib:int-mul
2 n
)
406 nfe n iflag par ipar
)
407 (declare (ignore var-1 var-2 var-3 var-4 var-5 var-6 var-7
408 var-8 var-9 var-10 var-11 var-13 var-15
413 (if (> iflag
0) (go end_label
))
415 (f2cl-lib:array-slice work-%data%
423 (f2cl-lib:int-mul
2 n
)
427 (f2cl-lib:array-slice work-%data%
435 (f2cl-lib:int-mul
2 n
)
445 ((f2cl-lib:int-add iw n
))
451 (f2cl-lib:int-mul
2 n
)
457 (f2cl-lib:array-slice work
466 (f2cl-lib:int-mul
2 n
)
472 (f2cl-lib:array-slice work
481 (f2cl-lib:int-mul
2 n
)
486 (f2cl-lib:array-slice work-%data%
495 (f2cl-lib:int-mul
2 n
)
503 (+ (f2cl-lib:fref yold
(np1) ((1 (f2cl-lib:int-add n
1))))
507 ((f2cl-lib:int-add iw n
))
511 (f2cl-lib:int-add n
1))
512 (f2cl-lib:int-mul
2 n
)
517 (f2cl-lib:array-slice work-%data%
526 (f2cl-lib:int-mul
2 n
)
531 (f2cl-lib:array-slice work-%data%
540 (f2cl-lib:int-mul
2 n
)
546 (f2cl-lib:array-slice work-%data%
555 (f2cl-lib:int-mul
2 n
)
560 (f2cl-lib:array-slice work-%data%
569 (f2cl-lib:int-mul
2 n
)
595 (in-package #-gcl
#:cl-user
#+gcl
"CL-USER")
596 #+#.
(cl:if
(cl:find-package
'#:f2cl
) '(and) '(or))
597 (eval-when (:load-toplevel
:compile-toplevel
:execute
)
598 (setf (gethash 'fortran-to-lisp
::rootns
599 fortran-to-lisp
::*f2cl-function-info
*)
600 (fortran-to-lisp::make-f2cl-finfo
601 :arg-types
'((fortran-to-lisp::integer4
) (fortran-to-lisp::integer4
)
602 (fortran-to-lisp::integer4
) (double-float)
603 (double-float) (array double-float
(*))
604 (array double-float
(*)) (array double-float
(*))
605 (array double-float
(*)) (array double-float
(*))
606 (array double-float
(*)) (fortran-to-lisp::integer4
)
607 (array fortran-to-lisp
::integer4
(*))
608 (array double-float
(*)) (array double-float
(*))
609 (array fortran-to-lisp
::integer4
(*)))
610 :return-values
'(nil fortran-to-lisp
::nfe fortran-to-lisp
::iflag nil
611 nil nil nil nil nil nil nil nil nil nil nil nil
)
612 :calls
'(fortran-to-lisp::dcopy fortran-to-lisp
::daxpy
613 fortran-to-lisp
::dnrm2 fortran-to-lisp
::tangns
614 fortran-to-lisp
::root fortran-to-lisp
::d1mach
))))