Rename *ll* and *ul* to ll and ul in $defint
[maxima.git] / share / fftpack5 / lisp / fftpack5_factor.lisp
blob2bddd6ffa01f9e24e48c6fa065e6f8212ebc62e6
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)
11 ;;;
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 (let ((ntryh
21 (make-array 4
22 :element-type 'f2cl-lib:integer4
23 :initial-contents '(4 2 3 5))))
24 (declare (type (array f2cl-lib:integer4 (4)) ntryh))
25 (defun factor (n nf fac)
26 (declare (type (array double-float (*)) fac)
27 (type (f2cl-lib:integer4) nf n))
28 (f2cl-lib:with-multi-array-data
29 ((fac double-float fac-%data% fac-%offset%))
30 (prog ((nr 0) (nq 0) (ntry 0) (j 0) (nl 0))
31 (declare (type (f2cl-lib:integer4) nl j ntry nq nr))
32 (setf nl n)
33 (setf nf 0)
34 (setf j 0)
35 label101
36 (setf j (f2cl-lib:int-add j 1))
37 (f2cl-lib:arithmetic-if (f2cl-lib:int-sub j 4)
38 (go label102)
39 (go label102)
40 (go label103))
41 label102
42 (setf ntry (f2cl-lib:fref ntryh (j) ((1 4))))
43 (go label104)
44 label103
45 (setf ntry (f2cl-lib:int-add ntry 2))
46 label104
47 (setf nq (the f2cl-lib:integer4 (truncate nl ntry)))
48 (setf nr (f2cl-lib:int-sub nl (f2cl-lib:int-mul ntry nq)))
49 (f2cl-lib:arithmetic-if nr (go label101) (go label105) (go label101))
50 label105
51 (setf nf (f2cl-lib:int-add nf 1))
52 (setf (f2cl-lib:fref fac-%data% (nf) ((1 *)) fac-%offset%)
53 (coerce (the f2cl-lib:integer4 ntry) 'double-float))
54 (setf nl nq)
55 (if (/= nl 1) (go label104))
56 (go end_label)
57 end_label
58 (return (values nil nf nil))))))
60 (in-package #:cl-user)
61 #+#.(cl:if (cl:find-package '#:f2cl) '(and) '(or))
62 (eval-when (:load-toplevel :compile-toplevel :execute)
63 (setf (gethash 'fortran-to-lisp::factor
64 fortran-to-lisp::*f2cl-function-info*)
65 (fortran-to-lisp::make-f2cl-finfo
66 :arg-types '((fortran-to-lisp::integer4) (fortran-to-lisp::integer4)
67 (array double-float (*)))
68 :return-values '(nil fortran-to-lisp::nf nil)
69 :calls 'nil)))