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")
20 (defun costb1 (n inc x wsave work ier
)
21 (declare (type (double-float) work
)
22 (type (array double-float
(*)) wsave x
)
23 (type (f2cl-lib:integer4
) ier inc n
))
24 (f2cl-lib:with-multi-array-data
25 ((x double-float x-%data% x-%offset%
)
26 (wsave double-float wsave-%data% wsave-%offset%
))
27 (prog ((dsum 0.0d0
) (xi 0.0d0
) (i 0) (fnm1s4 0.0d0
) (fnm1s2 0.0d0
) (ier1 0)
28 (lnwk 0) (lnsv 0) (lenx 0) (modn 0) (t2 0.0d0
) (t1 0.0d0
) (kc 0)
29 (k 0) (x2 0.0d0
) (x1p3 0.0d0
) (x1h 0.0d0
) (ns2 0) (np1 0) (nm1 0))
30 (declare (type (f2cl-lib:integer4
) nm1 np1 ns2 k kc modn lenx lnsv lnwk
32 (type (double-float) x1h x1p3 x2 t1 t2 fnm1s2 fnm1s4 xi dsum
))
34 (setf nm1
(f2cl-lib:int-sub n
1))
35 (setf np1
(f2cl-lib:int-add n
1))
36 (setf ns2
(the f2cl-lib
:integer4
(truncate n
2)))
37 (f2cl-lib:arithmetic-if
(f2cl-lib:int-sub n
2)
43 (+ (f2cl-lib:fref x-%data%
(1 1) ((1 inc
) (1 *)) x-%offset%
)
44 (f2cl-lib:fref x-%data%
(1 2) ((1 inc
) (1 *)) x-%offset%
)))
45 (setf (f2cl-lib:fref x-%data%
(1 2) ((1 inc
) (1 *)) x-%offset%
)
46 (- (f2cl-lib:fref x-%data%
(1 1) ((1 inc
) (1 *)) x-%offset%
)
47 (f2cl-lib:fref x-%data%
(1 2) ((1 inc
) (1 *)) x-%offset%
)))
48 (setf (f2cl-lib:fref x-%data%
(1 1) ((1 inc
) (1 *)) x-%offset%
) x1h
)
51 (if (> n
3) (go label103
))
53 (+ (f2cl-lib:fref x-%data%
(1 1) ((1 inc
) (1 *)) x-%offset%
)
54 (f2cl-lib:fref x-%data%
(1 3) ((1 inc
) (1 *)) x-%offset%
)))
55 (setf x2
(f2cl-lib:fref x-%data%
(1 2) ((1 inc
) (1 *)) x-%offset%
))
56 (setf (f2cl-lib:fref x-%data%
(1 2) ((1 inc
) (1 *)) x-%offset%
)
57 (- (f2cl-lib:fref x-%data%
(1 1) ((1 inc
) (1 *)) x-%offset%
)
58 (f2cl-lib:fref x-%data%
(1 3) ((1 inc
) (1 *)) x-%offset%
)))
59 (setf (f2cl-lib:fref x-%data%
(1 1) ((1 inc
) (1 *)) x-%offset%
)
61 (setf (f2cl-lib:fref x-%data%
(1 3) ((1 inc
) (1 *)) x-%offset%
)
65 (setf (f2cl-lib:fref x-%data%
(1 1) ((1 inc
) (1 *)) x-%offset%
)
66 (+ (f2cl-lib:fref x-%data%
(1 1) ((1 inc
) (1 *)) x-%offset%
)
67 (f2cl-lib:fref x-%data%
(1 1) ((1 inc
) (1 *)) x-%offset%
)))
68 (setf (f2cl-lib:fref x-%data%
(1 n
) ((1 inc
) (1 *)) x-%offset%
)
69 (+ (f2cl-lib:fref x-%data%
(1 n
) ((1 inc
) (1 *)) x-%offset%
)
70 (f2cl-lib:fref x-%data%
(1 n
) ((1 inc
) (1 *)) x-%offset%
)))
72 (- (f2cl-lib:fref x-%data%
(1 1) ((1 inc
) (1 *)) x-%offset%
)
73 (f2cl-lib:fref x-%data%
(1 n
) ((1 inc
) (1 *)) x-%offset%
)))
74 (setf (f2cl-lib:fref x-%data%
(1 1) ((1 inc
) (1 *)) x-%offset%
)
75 (+ (f2cl-lib:fref x-%data%
(1 1) ((1 inc
) (1 *)) x-%offset%
)
76 (f2cl-lib:fref x-%data%
(1 n
) ((1 inc
) (1 *)) x-%offset%
)))
77 (f2cl-lib:fdo
(k 2 (f2cl-lib:int-add k
1))
80 (setf kc
(f2cl-lib:int-sub np1 k
))
82 (+ (f2cl-lib:fref x-%data%
(1 k
) ((1 inc
) (1 *)) x-%offset%
)
83 (f2cl-lib:fref x-%data%
88 (- (f2cl-lib:fref x-%data%
(1 k
) ((1 inc
) (1 *)) x-%offset%
)
89 (f2cl-lib:fref x-%data%
96 (f2cl-lib:fref wsave-%data%
(kc) ((1 *)) wsave-%offset%
)
99 (* (f2cl-lib:fref wsave-%data%
(k) ((1 *)) wsave-%offset%
)
101 (setf (f2cl-lib:fref x-%data%
(1 k
) ((1 inc
) (1 *)) x-%offset%
)
103 (setf (f2cl-lib:fref x-%data%
(1 kc
) ((1 inc
) (1 *)) x-%offset%
)
106 (setf modn
(mod n
2))
107 (if (= modn
0) (go label124
))
108 (setf (f2cl-lib:fref x-%data%
109 (1 (f2cl-lib:int-add ns2
1))
113 (f2cl-lib:fref x-%data%
114 (1 (f2cl-lib:int-add ns2
1))
117 (f2cl-lib:fref x-%data%
118 (1 (f2cl-lib:int-add ns2
1))
123 (f2cl-lib:int-add
(f2cl-lib:int-mul inc
(f2cl-lib:int-sub nm1
1))
126 (f2cl-lib:int-add nm1
128 (/ (f2cl-lib:flog
(f2cl-lib:freal nm1
))
129 (f2cl-lib:flog
2.0d0
)))
133 (var-0 var-1 var-2 var-3 var-4 var-5 var-6 var-7 var-8
)
134 (rfft1f nm1 inc x lenx
135 (f2cl-lib:array-slice wsave-%data%
141 (make-array 1 :element-type
(type-of work
) :initial-element work
)
143 (declare (ignore var-0 var-1 var-2 var-3 var-4 var-5 var-6 var-7
))
150 (setf fnm1s2
(/ (f2cl-lib:ffloat nm1
) 2.0d0
))
151 (setf dsum
(* 0.5d0 dsum
))
152 (setf (f2cl-lib:fref x-%data%
(1 1) ((1 inc
) (1 *)) x-%offset%
)
154 (f2cl-lib:fref x-%data%
(1 1) ((1 inc
) (1 *)) x-%offset%
)))
155 (if (/= (mod nm1
2) 0) (go label30
))
156 (setf (f2cl-lib:fref x-%data%
(1 nm1
) ((1 inc
) (1 *)) x-%offset%
)
157 (+ (f2cl-lib:fref x-%data%
(1 nm1
) ((1 inc
) (1 *)) x-%offset%
)
158 (f2cl-lib:fref x-%data%
(1 nm1
) ((1 inc
) (1 *)) x-%offset%
)))
160 (setf fnm1s4
(/ (f2cl-lib:ffloat nm1
) 4.0d0
))
161 (f2cl-lib:fdo
(i 3 (f2cl-lib:int-add i
2))
166 (f2cl-lib:fref x-%data%
170 (setf (f2cl-lib:fref x-%data%
(1 i
) ((1 inc
) (1 *)) x-%offset%
)
172 (f2cl-lib:fref x-%data%
173 (1 (f2cl-lib:int-sub i
1))
176 (setf (f2cl-lib:fref x-%data%
177 (1 (f2cl-lib:int-sub i
1))
181 (setf dsum
(+ dsum xi
))
183 (if (/= modn
0) (go end_label
))
184 (setf (f2cl-lib:fref x-%data%
(1 n
) ((1 inc
) (1 *)) x-%offset%
) dsum
)
188 (return (values nil nil nil nil nil ier
)))))
190 (in-package #:cl-user
)
191 #+#.
(cl:if
(cl:find-package
'#:f2cl
) '(and) '(or))
192 (eval-when (:load-toplevel
:compile-toplevel
:execute
)
193 (setf (gethash 'fortran-to-lisp
::costb1
194 fortran-to-lisp
::*f2cl-function-info
*)
195 (fortran-to-lisp::make-f2cl-finfo
196 :arg-types
'((fortran-to-lisp::integer4
) (fortran-to-lisp::integer4
)
197 (array double-float
(*)) (array double-float
(*))
198 (double-float) (fortran-to-lisp::integer4
))
199 :return-values
'(nil nil nil nil nil fortran-to-lisp
::ier
)
200 :calls
'(fortran-to-lisp::xerfft fortran-to-lisp
::rfft1f
))))