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")
20 (defun ffunp (n numt mmaxt kdeg coef cl x xx trm dtrm clx dxnp1 f df
)
21 (declare (type (array double-float
(*)) df f dxnp1 clx dtrm trm xx x cl coef
)
22 (type (array f2cl-lib
:integer4
(*)) kdeg numt
)
23 (type (f2cl-lib:integer4
) mmaxt n
))
24 (f2cl-lib:with-multi-array-data
25 ((numt f2cl-lib
:integer4 numt-%data% numt-%offset%
)
26 (kdeg f2cl-lib
:integer4 kdeg-%data% kdeg-%offset%
)
27 (coef double-float coef-%data% coef-%offset%
)
28 (cl double-float cl-%data% cl-%offset%
)
29 (x double-float x-%data% x-%offset%
)
30 (xx double-float xx-%data% xx-%offset%
)
31 (trm double-float trm-%data% trm-%offset%
)
32 (dtrm double-float dtrm-%data% dtrm-%offset%
)
33 (clx double-float clx-%data% clx-%offset%
)
34 (dxnp1 double-float dxnp1-%data% dxnp1-%offset%
)
35 (f double-float f-%data% f-%offset%
)
36 (df double-float df-%data% df-%offset%
))
37 (prog ((temp1 (make-array 2 :element-type
'double-float
))
38 (temp2 (make-array 2 :element-type
'double-float
))
39 (xnp1 (make-array 2 :element-type
'double-float
)) (i 0) (ierr 0)
40 (j 0) (k 0) (l 0) (m 0) (nnnn 0) (np1 0))
41 (declare (type (f2cl-lib:integer4
) np1 nnnn m l k j ierr i
)
42 (type (array double-float
(2)) xnp1 temp2 temp1
))
43 (setf np1
(f2cl-lib:int-add n
1))
44 (f2cl-lib:fdo
(j 1 (f2cl-lib:int-add j
1))
48 (f2cl-lib:array-slice cl-%data%
51 ((1 2) (1 (f2cl-lib:int-add n
1)))
53 (f2cl-lib:array-slice x-%data%
58 (f2cl-lib:array-slice clx-%data%
64 (f2cl-lib:fdo
(i 1 (f2cl-lib:int-add i
1))
67 (setf (f2cl-lib:fref xnp1
(i) ((1 2)))
68 (f2cl-lib:fref cl-%data%
70 ((1 2) (1 (f2cl-lib:int-add n
1)))
72 (f2cl-lib:fdo
(j 1 (f2cl-lib:int-add j
1))
75 (setf (f2cl-lib:fref xnp1
(i) ((1 2)))
76 (+ (f2cl-lib:fref xnp1
(i) ((1 2)))
77 (f2cl-lib:fref clx-%data%
81 (setf (f2cl-lib:fref dxnp1-%data%
85 (f2cl-lib:fref cl-%data%
87 ((1 2) (1 (f2cl-lib:int-add n
1)))
91 (f2cl-lib:fdo
(j 1 (f2cl-lib:int-add j
1))
94 (f2cl-lib:fdo
(k 1 (f2cl-lib:int-add k
1))
95 ((> k
(f2cl-lib:fref numt
(j) ((1 n
)))) nil
)
98 (f2cl-lib:fref kdeg-%data%
100 ((1 n
) (1 (f2cl-lib:int-add n
1)) (1 mmaxt
))
103 (f2cl-lib:array-slice xx-%data%
106 ((1 2) (1 n
) (1 (f2cl-lib:int-add n
1))
109 (f2cl-lib:fdo
(l 1 (f2cl-lib:int-add l
1))
113 (f2cl-lib:fref kdeg-%data%
115 ((1 n
) (1 (f2cl-lib:int-add n
1)) (1 mmaxt
))
117 (f2cl-lib:array-slice x-%data%
122 (f2cl-lib:array-slice xx-%data%
126 (1 (f2cl-lib:int-add n
1)) (1 mmaxt
))
130 (f2cl-lib:fdo
(j 1 (f2cl-lib:int-add j
1))
133 (f2cl-lib:fdo
(k 1 (f2cl-lib:int-add k
1))
134 ((> k
(f2cl-lib:fref numt
(j) ((1 n
)))) nil
)
136 (setf (f2cl-lib:fref trm-%data%
138 ((1 2) (1 n
) (1 mmaxt
))
140 (f2cl-lib:fref coef-%data%
144 (setf (f2cl-lib:fref trm-%data%
146 ((1 2) (1 n
) (1 mmaxt
))
148 (coerce 0.0f0
'double-float
))
149 (f2cl-lib:fdo
(l 1 (f2cl-lib:int-add l
1))
153 (f2cl-lib:array-slice xx-%data%
157 (1 (f2cl-lib:int-add n
1)) (1 mmaxt
))
159 (f2cl-lib:array-slice trm-%data%
162 ((1 2) (1 n
) (1 mmaxt
))
165 (setf (f2cl-lib:fref trm-%data%
167 ((1 2) (1 n
) (1 mmaxt
))
169 (f2cl-lib:fref temp1
(1) ((1 2))))
170 (setf (f2cl-lib:fref trm-%data%
172 ((1 2) (1 n
) (1 mmaxt
))
174 (f2cl-lib:fref temp1
(2) ((1 2))))
178 (f2cl-lib:fdo
(j 1 (f2cl-lib:int-add j
1))
181 (setf (f2cl-lib:fref f-%data%
(1 j
) ((1 2) (1 n
)) f-%offset%
)
182 (coerce 0.0f0
'double-float
))
183 (setf (f2cl-lib:fref f-%data%
(2 j
) ((1 2) (1 n
)) f-%offset%
)
184 (coerce 0.0f0
'double-float
))
185 (f2cl-lib:fdo
(i 1 (f2cl-lib:int-add i
1))
188 (f2cl-lib:fdo
(k 1 (f2cl-lib:int-add k
1))
189 ((> k
(f2cl-lib:fref numt
(j) ((1 n
)))) nil
)
191 (setf (f2cl-lib:fref f-%data%
(i j
) ((1 2) (1 n
)) f-%offset%
)
193 (f2cl-lib:fref f-%data%
197 (f2cl-lib:fref trm-%data%
199 ((1 2) (1 n
) (1 mmaxt
))
204 (f2cl-lib:fdo
(j 1 (f2cl-lib:int-add j
1))
207 (f2cl-lib:fdo
(k 1 (f2cl-lib:int-add k
1))
208 ((> k
(f2cl-lib:fref numt
(j) ((1 n
)))) nil
)
210 (f2cl-lib:fdo
(m 1 (f2cl-lib:int-add m
1))
217 ((1 n
) (1 (f2cl-lib:int-add n
1))
220 (setf (f2cl-lib:fref dtrm-%data%
223 (1 (f2cl-lib:int-add n
1))
226 (coerce 0.0f0
'double-float
))
227 (setf (f2cl-lib:fref dtrm-%data%
230 (1 (f2cl-lib:int-add n
1))
233 (coerce 0.0f0
'double-float
)))
236 (multiple-value-bind (var-0 var-1 var-2 var-3
)
238 (f2cl-lib:array-slice trm-%data%
241 ((1 2) (1 n
) (1 mmaxt
))
243 (f2cl-lib:array-slice x-%data%
248 (f2cl-lib:array-slice dtrm-%data%
252 (1 (f2cl-lib:int-add n
1))
256 (declare (ignore var-0 var-1 var-2
))
259 (multiple-value-bind (var-0 var-1 var-2 var-3
)
261 (f2cl-lib:array-slice trm-%data%
264 ((1 2) (1 n
) (1 mmaxt
))
267 (f2cl-lib:array-slice dtrm-%data%
271 (1 (f2cl-lib:int-add n
1))
275 (declare (ignore var-0 var-1 var-2
))
279 (setf (f2cl-lib:fref dtrm-%data%
282 (1 (f2cl-lib:int-add n
1))
286 (f2cl-lib:fref kdeg-%data%
289 (1 (f2cl-lib:int-add n
1))
292 (f2cl-lib:fref dtrm-%data%
295 (1 (f2cl-lib:int-add n
1))
298 (setf (f2cl-lib:fref dtrm-%data%
301 (1 (f2cl-lib:int-add n
1))
305 (f2cl-lib:fref kdeg-%data%
308 (1 (f2cl-lib:int-add n
1))
311 (f2cl-lib:fref dtrm-%data%
314 (1 (f2cl-lib:int-add n
1))
318 (setf (f2cl-lib:fref dtrm-%data%
321 (1 (f2cl-lib:int-add n
1))
324 (f2cl-lib:fref coef-%data%
328 (setf (f2cl-lib:fref dtrm-%data%
331 (1 (f2cl-lib:int-add n
1))
334 (coerce 0.0f0
'double-float
))
335 (f2cl-lib:fdo
(l 1 (f2cl-lib:int-add l
1))
338 (if (= l m
) (go label320
))
340 (f2cl-lib:array-slice xx-%data%
344 (1 (f2cl-lib:int-add n
1))
347 (f2cl-lib:array-slice dtrm-%data%
351 (1 (f2cl-lib:int-add n
1))
355 (setf (f2cl-lib:fref dtrm-%data%
358 (1 (f2cl-lib:int-add n
1))
361 (f2cl-lib:fref temp1
(1) ((1 2))))
362 (setf (f2cl-lib:fref dtrm-%data%
365 (1 (f2cl-lib:int-add n
1))
368 (f2cl-lib:fref temp1
(2) ((1 2))))
372 (f2cl-lib:fref kdeg-%data%
375 (1 (f2cl-lib:int-add n
1))
381 (f2cl-lib:array-slice x-%data%
387 (if (= m np1
) (powp nnnn xnp1 temp2
))
389 (f2cl-lib:array-slice dtrm-%data%
393 (1 (f2cl-lib:int-add n
1))
396 (setf (f2cl-lib:fref dtrm-%data%
399 (1 (f2cl-lib:int-add n
1))
403 (f2cl-lib:fref kdeg-%data%
406 (1 (f2cl-lib:int-add n
1))
409 (f2cl-lib:fref dtrm-%data%
412 (1 (f2cl-lib:int-add n
1))
415 (setf (f2cl-lib:fref dtrm-%data%
418 (1 (f2cl-lib:int-add n
1))
422 (f2cl-lib:fref kdeg-%data%
425 (1 (f2cl-lib:int-add n
1))
428 (f2cl-lib:fref dtrm-%data%
431 (1 (f2cl-lib:int-add n
1))
436 (f2cl-lib:fdo
(j 1 (f2cl-lib:int-add j
1))
439 (f2cl-lib:fdo
(m 1 (f2cl-lib:int-add m
1))
442 (setf (f2cl-lib:fref df-%data%
444 ((1 2) (1 n
) (1 (f2cl-lib:int-add n
1)))
446 (coerce 0.0f0
'double-float
))
447 (setf (f2cl-lib:fref df-%data%
449 ((1 2) (1 n
) (1 (f2cl-lib:int-add n
1)))
451 (coerce 0.0f0
'double-float
))
452 (f2cl-lib:fdo
(i 1 (f2cl-lib:int-add i
1))
455 (f2cl-lib:fdo
(k 1 (f2cl-lib:int-add k
1))
456 ((> k
(f2cl-lib:fref numt
(j) ((1 n
)))) nil
)
458 (setf (f2cl-lib:fref df-%data%
461 (1 (f2cl-lib:int-add n
1)))
464 (f2cl-lib:fref df-%data%
467 (1 (f2cl-lib:int-add n
1)))
469 (f2cl-lib:fref dtrm-%data%
472 (1 (f2cl-lib:int-add n
1))
479 (f2cl-lib:fdo
(j 1 (f2cl-lib:int-add j
1))
482 (f2cl-lib:fdo
(k 1 (f2cl-lib:int-add k
1))
486 (f2cl-lib:array-slice df-%data%
489 ((1 2) (1 n
) (1 (f2cl-lib:int-add n
1)))
491 (f2cl-lib:array-slice dxnp1-%data%
497 (f2cl-lib:fdo
(i 1 (f2cl-lib:int-add i
1))
500 (setf (f2cl-lib:fref df-%data%
502 ((1 2) (1 n
) (1 (f2cl-lib:int-add n
1)))
505 (f2cl-lib:fref df-%data%
508 (1 (f2cl-lib:int-add n
1)))
510 (f2cl-lib:fref temp1
(i) ((1 2)))))
516 (values nil nil nil nil nil nil nil nil nil nil nil nil nil nil
)))))
518 (in-package #:cl-user
)
519 #+#.
(cl:if
(cl:find-package
'#:f2cl
) '(and) '(or))
520 (eval-when (:load-toplevel
:compile-toplevel
:execute
)
521 (setf (gethash 'fortran-to-lisp
::ffunp fortran-to-lisp
::*f2cl-function-info
*)
522 (fortran-to-lisp::make-f2cl-finfo
523 :arg-types
'((fortran-to-lisp::integer4
)
524 (array fortran-to-lisp
::integer4
(*))
525 (fortran-to-lisp::integer4
)
526 (array fortran-to-lisp
::integer4
(*))
527 (array double-float
(*)) (array double-float
(*))
528 (array double-float
(*)) (array double-float
(*))
529 (array double-float
(*)) (array double-float
(*))
530 (array double-float
(*)) (array double-float
(*))
531 (array double-float
(*)) (array double-float
(*)))
532 :return-values
'(nil nil nil nil nil nil nil nil nil nil nil nil nil
534 :calls
'(fortran-to-lisp::divp fortran-to-lisp
::powp
535 fortran-to-lisp
::mulp
))))