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")
35 (declare (type (double-float) dum lmfpn ntur rtol sum
)
36 (type (f2cl-lib:integer4
) i iflag f2cl-lib
:index irmax j jj k lenr
39 (n nn mmaxt numt deg mode eps0 coef nnumt ddeg ccoef alpha beta rwork
40 xwork facv face coescl ierr
)
41 (declare (type (array double-float
(*)) coescl face facv xwork rwork beta
43 (type (double-float) eps0
)
44 (type (array f2cl-lib
:integer4
(*)) ddeg nnumt deg numt
)
45 (type (f2cl-lib:integer4
) ierr mode mmaxt nn n
))
46 (f2cl-lib:with-multi-array-data
47 ((numt f2cl-lib
:integer4 numt-%data% numt-%offset%
)
48 (deg f2cl-lib
:integer4 deg-%data% deg-%offset%
)
49 (nnumt f2cl-lib
:integer4 nnumt-%data% nnumt-%offset%
)
50 (ddeg f2cl-lib
:integer4 ddeg-%data% ddeg-%offset%
)
51 (coef double-float coef-%data% coef-%offset%
)
52 (ccoef double-float ccoef-%data% ccoef-%offset%
)
53 (alpha double-float alpha-%data% alpha-%offset%
)
54 (beta double-float beta-%data% beta-%offset%
)
55 (rwork double-float rwork-%data% rwork-%offset%
)
56 (xwork double-float xwork-%data% xwork-%offset%
)
57 (facv double-float facv-%data% facv-%offset%
)
58 (face double-float face-%data% face-%offset%
)
59 (coescl double-float coescl-%data% coescl-%offset%
))
63 (setf n2
(f2cl-lib:int-mul
2 n
))
64 (setf lmfpn
(f2cl-lib:d1mach
2))
65 (setf ntur
(* (f2cl-lib:d1mach
4) n
))
66 (setf lenr
(the f2cl-lib
:integer4
(truncate (* n
(+ n
1)) 2)))
67 (f2cl-lib:fdo
(i 1 (f2cl-lib:int-add i
1))
71 (setf (f2cl-lib:fref nnumt-%data%
(i) ((1 n
)) nnumt-%offset%
) 0)
72 (f2cl-lib:fdo
(j 1 (f2cl-lib:int-add j
1))
73 ((> j
(f2cl-lib:fref numt
(i) ((1 nn
)))) nil
)
76 ((> (abs (f2cl-lib:fref coef
(i j
) ((1 nn
) (1 mmaxt
)))) eps0
)
77 (setf jj
(f2cl-lib:int-add jj
1))
78 (setf (f2cl-lib:fref nnumt-%data%
83 (f2cl-lib:fref nnumt-%data%
88 (setf (f2cl-lib:fref ccoef-%data%
92 (f2cl-lib:fref coef-%data%
96 (f2cl-lib:fdo
(k 1 (f2cl-lib:int-add k
1))
99 (setf (f2cl-lib:fref ddeg-%data%
101 ((1 n
) (1 (f2cl-lib:int-add n
1))
104 (f2cl-lib:fref deg-%data%
107 (1 (f2cl-lib:int-add nn
1))
113 (f2cl-lib:fdo
(i 1 (f2cl-lib:int-add i
1))
116 (f2cl-lib:fdo
(j 1 (f2cl-lib:int-add j
1))
117 ((> j
(f2cl-lib:fref nnumt
(i) ((1 n
)))) nil
)
119 (setf (f2cl-lib:fref coescl-%data%
125 (f2cl-lib:fref ccoef-%data%
134 (f2cl-lib:fdo
(s 1 (f2cl-lib:int-add s
1))
137 (f2cl-lib:fdo
(k 1 (f2cl-lib:int-add k
1))
140 (setf (f2cl-lib:fref alpha-%data%
142 ((1 (f2cl-lib:int-mul
2 n
))
143 (1 (f2cl-lib:int-mul
2 n
)))
145 (coerce (the f2cl-lib
:integer4
0) 'double-float
))
148 (f2cl-lib:fdo
(s 1 (f2cl-lib:int-add s
1))
151 (setf (f2cl-lib:fref alpha-%data%
153 ((1 (f2cl-lib:int-mul
2 n
))
154 (1 (f2cl-lib:int-mul
2 n
)))
157 (the f2cl-lib
:integer4
158 (f2cl-lib:fref nnumt-%data%
164 (f2cl-lib:fdo
(s 1 (f2cl-lib:int-add s
1))
167 (f2cl-lib:fdo
(i 1 (f2cl-lib:int-add i
1))
171 (coerce (the f2cl-lib
:integer4
0) 'double-float
))
172 (f2cl-lib:fdo
(j 1 (f2cl-lib:int-add j
1))
173 ((> j
(f2cl-lib:fref nnumt
(i) ((1 n
)))) nil
)
177 (f2cl-lib:fref ddeg-%data%
180 (1 (f2cl-lib:int-add n
1))
184 (setf (f2cl-lib:fref alpha-%data%
185 ((f2cl-lib:int-add n s
) i
)
186 ((1 (f2cl-lib:int-mul
2 n
))
187 (1 (f2cl-lib:int-mul
2 n
)))
192 (f2cl-lib:fdo
(s 1 (f2cl-lib:int-add s
1))
195 (f2cl-lib:fdo
(k 1 (f2cl-lib:int-add k
1))
199 (coerce (the f2cl-lib
:integer4
0) 'double-float
))
200 (f2cl-lib:fdo
(i 1 (f2cl-lib:int-add i
1))
203 (f2cl-lib:fdo
(j 1 (f2cl-lib:int-add j
1))
204 ((> j
(f2cl-lib:fref nnumt
(i) ((1 n
))))
210 (f2cl-lib:fref ddeg-%data%
218 (f2cl-lib:fref ddeg-%data%
228 (setf (f2cl-lib:fref alpha-%data%
229 ((f2cl-lib:int-add n s
)
230 (f2cl-lib:int-add n k
))
231 ((1 (f2cl-lib:int-mul
2 n
))
232 (1 (f2cl-lib:int-mul
2 n
)))
237 (f2cl-lib:fdo
(s 1 (f2cl-lib:int-add s
1))
240 (f2cl-lib:fdo
(k 1 (f2cl-lib:int-add k
1))
244 (coerce (the f2cl-lib
:integer4
0) 'double-float
))
245 (f2cl-lib:fdo
(j 1 (f2cl-lib:int-add j
1))
246 ((> j
(f2cl-lib:fref nnumt
(s) ((1 n
)))) nil
)
250 (f2cl-lib:fref ddeg-%data%
253 (1 (f2cl-lib:int-add n
1))
257 (setf (f2cl-lib:fref alpha-%data%
258 (s (f2cl-lib:int-add n k
))
259 ((1 (f2cl-lib:int-mul
2 n
))
260 (1 (f2cl-lib:int-mul
2 n
)))
265 (multiple-value-bind (var-0 var-1 var-2 var-3
)
266 (qrfaqf alpha rwork
(f2cl-lib:int-mul
2 n
) iflag
)
267 (declare (ignore var-0 var-1 var-2
))
269 (setf irmax
(idamax lenr rwork
1))
272 (f2cl-lib:fref rwork-%data%
282 (setf f2cl-lib
:index
1)
283 (f2cl-lib:fdo
(i n
(f2cl-lib:int-add i
(f2cl-lib:int-sub
1)))
298 (setf (f2cl-lib:fref rwork-%data%
310 (setf f2cl-lib
:index
(f2cl-lib:int-add f2cl-lib
:index i
))
320 (f2cl-lib:int-mul
2 n
)
323 (setf (f2cl-lib:fref rwork-%data%
334 (f2cl-lib:fdo
(s 1 (f2cl-lib:int-add s
1))
337 (setf sum
(coerce (the f2cl-lib
:integer4
0) 'double-float
))
338 (f2cl-lib:fdo
(j 1 (f2cl-lib:int-add j
1))
339 ((> j
(f2cl-lib:fref nnumt
(s) ((1 n
)))) nil
)
343 (f2cl-lib:fref coescl-%data%
348 (setf (f2cl-lib:fref beta-%data%
350 ((1 (f2cl-lib:int-mul
2 n
)))
354 (f2cl-lib:fdo
(s 1 (f2cl-lib:int-add s
1))
357 (setf sum
(coerce (the f2cl-lib
:integer4
0) 'double-float
))
358 (f2cl-lib:fdo
(i 1 (f2cl-lib:int-add i
1))
361 (f2cl-lib:fdo
(j 1 (f2cl-lib:int-add j
1))
362 ((> j
(f2cl-lib:fref nnumt
(i) ((1 n
)))) nil
)
367 (f2cl-lib:fref coescl-%data%
371 (f2cl-lib:fref ddeg-%data%
374 (1 (f2cl-lib:int-add n
1))
379 (setf (f2cl-lib:fref beta-%data%
380 ((f2cl-lib:int-add n s
))
381 ((1 (f2cl-lib:int-mul
2 n
)))
385 (qrslqf alpha rwork beta xwork
(f2cl-lib:int-mul
2 n
))
386 (f2cl-lib:fdo
(i 1 (f2cl-lib:int-add i
1))
389 (setf (f2cl-lib:fref face-%data%
(i) ((1 n
)) face-%offset%
)
390 (f2cl-lib:fref beta-%data%
392 ((1 (f2cl-lib:int-mul
2 n
)))
394 (setf (f2cl-lib:fref facv-%data%
(i) ((1 n
)) facv-%offset%
)
395 (f2cl-lib:fref beta-%data%
396 ((f2cl-lib:int-add n i
))
397 ((1 (f2cl-lib:int-mul
2 n
)))
400 (f2cl-lib:fdo
(i 1 (f2cl-lib:int-add i
1))
403 (f2cl-lib:fdo
(j 1 (f2cl-lib:int-add j
1))
404 ((> j
(f2cl-lib:fref numt
(i) ((1 nn
)))) nil
)
408 (f2cl-lib:fref coef-%data%
414 (setf (f2cl-lib:fref coescl-%data%
418 (coerce 0.0f0
'double-float
)))
422 (f2cl-lib:fref face-%data%
426 (f2cl-lib:log10 dum
)))
427 (f2cl-lib:fdo
(k 1 (f2cl-lib:int-add k
1))
433 (f2cl-lib:fref facv-%data%
437 (f2cl-lib:fref deg-%data%
440 (1 (f2cl-lib:int-add nn
1))
444 (setf (f2cl-lib:fref coescl-%data%
448 (f2cl-lib:sign
(expt 10.0f0 sum
)
449 (f2cl-lib:fref coef-%data%
478 (in-package #:cl-user
)
479 #+#.
(cl:if
(cl:find-package
'#:f2cl
) '(and) '(or))
480 (eval-when (:load-toplevel
:compile-toplevel
:execute
)
481 (setf (gethash 'fortran-to-lisp
::sclgnp
482 fortran-to-lisp
::*f2cl-function-info
*)
483 (fortran-to-lisp::make-f2cl-finfo
484 :arg-types
'((fortran-to-lisp::integer4
) (fortran-to-lisp::integer4
)
485 (fortran-to-lisp::integer4
)
486 (array fortran-to-lisp
::integer4
(*))
487 (array fortran-to-lisp
::integer4
(*))
488 (fortran-to-lisp::integer4
) (double-float)
489 (array double-float
(*))
490 (array fortran-to-lisp
::integer4
(*))
491 (array fortran-to-lisp
::integer4
(*))
492 (array double-float
(*)) (array double-float
(*))
493 (array double-float
(*)) (array double-float
(*))
494 (array double-float
(*)) (array double-float
(*))
495 (array double-float
(*)) (array double-float
(*))
496 (fortran-to-lisp::integer4
))
497 :return-values
'(nil nil nil nil nil nil nil nil nil nil nil nil nil
498 nil nil nil nil nil fortran-to-lisp
::ierr
)
499 :calls
'(fortran-to-lisp::idamax fortran-to-lisp
::qrslqf
500 fortran-to-lisp
::qrfaqf fortran-to-lisp
::d1mach
))))