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 single-float))
17 (in-package "FFTPACK5")
22 :element-type
'f2cl-lib
:integer4
23 :initial-contents
'(4 2 3 5))))
24 (declare (type (array f2cl-lib
:integer4
(4)) ntryh
))
25 (defun mrfti1 (n wa fac
)
26 (declare (type (array double-float
(*)) fac
)
27 (type (array double-float
(*)) wa
)
28 (type (f2cl-lib:integer4
) n
))
29 (f2cl-lib:with-multi-array-data
30 ((wa double-float wa-%data% wa-%offset%
)
31 (fac double-float fac-%data% fac-%offset%
))
32 (prog ((tpi 0.0d0
) (argh 0.0d0
) (argld 0.0d0
) (arg 0.0d0
) (ii 0)
33 (fi 0.0d0
) (ipm 0) (ido 0) (l2 0) (ld 0) (ip 0) (k1 0) (l1 0)
34 (nfm1 0) (is 0) (ib 0) (i 0) (nr 0) (nq 0) (ntry 0) (j 0) (nf 0)
36 (declare (type (f2cl-lib:integer4
) nl nf j ntry nq nr i ib is nfm1 l1
37 k1 ip ld l2 ido ipm ii
)
38 (type (double-float) fi arg argld argh tpi
))
43 (setf j
(f2cl-lib:int-add j
1))
44 (f2cl-lib:arithmetic-if
(f2cl-lib:int-sub j
4)
49 (setf ntry
(f2cl-lib:fref ntryh
(j) ((1 4))))
52 (setf ntry
(f2cl-lib:int-add ntry
2))
54 (setf nq
(the f2cl-lib
:integer4
(truncate nl ntry
)))
55 (setf nr
(f2cl-lib:int-sub nl
(f2cl-lib:int-mul ntry nq
)))
56 (f2cl-lib:arithmetic-if nr
(go label101
) (go label105
) (go label101
))
58 (setf nf
(f2cl-lib:int-add nf
1))
59 (setf (f2cl-lib:fref fac-%data%
60 ((f2cl-lib:int-add nf
2))
63 (coerce (the f2cl-lib
:integer4 ntry
) 'double-float
))
65 (if (/= ntry
2) (go label107
))
66 (if (= nf
1) (go label107
))
67 (f2cl-lib:fdo
(i 2 (f2cl-lib:int-add i
1))
70 (setf ib
(f2cl-lib:int-add
(f2cl-lib:int-sub nf i
) 2))
71 (setf (f2cl-lib:fref fac-%data%
72 ((f2cl-lib:int-add ib
2))
75 (f2cl-lib:fref fac-%data%
76 ((f2cl-lib:int-add ib
1))
80 (setf (f2cl-lib:fref fac-%data%
(3) ((1 15)) fac-%offset%
)
81 (coerce (the f2cl-lib
:integer4
2) 'double-float
))
83 (if (/= nl
1) (go label104
))
84 (setf (f2cl-lib:fref fac-%data%
(1) ((1 15)) fac-%offset%
)
85 (coerce (the f2cl-lib
:integer4 n
) 'double-float
))
86 (setf (f2cl-lib:fref fac-%data%
(2) ((1 15)) fac-%offset%
)
87 (coerce (the f2cl-lib
:integer4 nf
) 'double-float
))
88 (setf tpi
(* 8.0d0
(f2cl-lib:datan
1.0d0
)))
89 (setf argh
(/ tpi
(f2cl-lib:ffloat n
)))
91 (setf nfm1
(f2cl-lib:int-sub nf
1))
93 (if (= nfm1
0) (go end_label
))
94 (f2cl-lib:fdo
(k1 1 (f2cl-lib:int-add k1
1))
99 (f2cl-lib:fref fac-%data%
100 ((f2cl-lib:int-add k1
2))
104 (setf l2
(f2cl-lib:int-mul l1 ip
))
105 (setf ido
(the f2cl-lib
:integer4
(truncate n l2
)))
106 (setf ipm
(f2cl-lib:int-sub ip
1))
107 (f2cl-lib:fdo
(j 1 (f2cl-lib:int-add j
1))
110 (setf ld
(f2cl-lib:int-add ld l1
))
112 (setf argld
(* (f2cl-lib:ffloat ld
) argh
))
114 (f2cl-lib:fdo
(ii 3 (f2cl-lib:int-add ii
2))
117 (setf i
(f2cl-lib:int-add i
2))
118 (setf fi
(+ fi
1.0d0
))
119 (setf arg
(* fi argld
))
120 (setf (f2cl-lib:fref wa-%data%
121 ((f2cl-lib:int-sub i
1))
125 (setf (f2cl-lib:fref wa-%data%
(i) ((1 n
)) wa-%offset%
)
128 (setf is
(f2cl-lib:int-add is ido
))
134 (return (values nil nil nil
))))))
136 (in-package #:cl-user
)
137 #+#.
(cl:if
(cl:find-package
'#:f2cl
) '(and) '(or))
138 (eval-when (:load-toplevel
:compile-toplevel
:execute
)
139 (setf (gethash 'fortran-to-lisp
::mrfti1
140 fortran-to-lisp
::*f2cl-function-info
*)
141 (fortran-to-lisp::make-f2cl-finfo
142 :arg-types
'((fortran-to-lisp::integer4
) (array double-float
(*))
143 (array double-float
(*)))
144 :return-values
'(nil nil nil
)