In documentation for lreduce and rreduce, supply second argument as an explicit list
[maxima.git] / share / odepack / src / nnsc.lisp
blobe7dbcfbd92ab14e5071dcee59456a8aeb41ff26a
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-2013-11 (20E 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 "ODEPACK")
20 (defun nnsc (n r c il jl ijl l d iu ju iju u z b tmp)
21 (declare (type (array double-float (*)) tmp b z u d l)
22 (type (array f2cl-lib:integer4 (*)) iju ju iu ijl jl il c r)
23 (type (f2cl-lib:integer4) n))
24 (f2cl-lib:with-multi-array-data
25 ((r f2cl-lib:integer4 r-%data% r-%offset%)
26 (c f2cl-lib:integer4 c-%data% c-%offset%)
27 (il f2cl-lib:integer4 il-%data% il-%offset%)
28 (jl f2cl-lib:integer4 jl-%data% jl-%offset%)
29 (ijl f2cl-lib:integer4 ijl-%data% ijl-%offset%)
30 (iu f2cl-lib:integer4 iu-%data% iu-%offset%)
31 (ju f2cl-lib:integer4 ju-%data% ju-%offset%)
32 (iju f2cl-lib:integer4 iju-%data% iju-%offset%)
33 (l double-float l-%data% l-%offset%)
34 (d double-float d-%data% d-%offset%)
35 (u double-float u-%data% u-%offset%)
36 (z double-float z-%data% z-%offset%)
37 (b double-float b-%data% b-%offset%)
38 (tmp double-float tmp-%data% tmp-%offset%))
39 (prog ((tmpk 0.0d0) (sum 0.0d0) (mu 0) (i 0) (j 0) (ml 0) (jmax 0) (jmin 0)
40 (k 0))
41 (declare (type (f2cl-lib:integer4) k jmin jmax ml j i mu)
42 (type (double-float) sum tmpk))
43 (f2cl-lib:fdo (k 1 (f2cl-lib:int-add k 1))
44 ((> k n) nil)
45 (tagbody
46 label1
47 (setf (f2cl-lib:fref tmp-%data% (k) ((1 *)) tmp-%offset%)
48 (f2cl-lib:fref b-%data%
49 ((f2cl-lib:fref r (k) ((1 *))))
50 ((1 *))
51 b-%offset%))))
52 (f2cl-lib:fdo (k 1 (f2cl-lib:int-add k 1))
53 ((> k n) nil)
54 (tagbody
55 (setf jmin (f2cl-lib:fref il-%data% (k) ((1 *)) il-%offset%))
56 (setf jmax
57 (f2cl-lib:int-sub
58 (f2cl-lib:fref il-%data%
59 ((f2cl-lib:int-add k 1))
60 ((1 *))
61 il-%offset%)
62 1))
63 (setf tmpk
64 (* (- (f2cl-lib:fref d-%data% (k) ((1 *)) d-%offset%))
65 (f2cl-lib:fref tmp-%data% (k) ((1 *)) tmp-%offset%)))
66 (setf (f2cl-lib:fref tmp-%data% (k) ((1 *)) tmp-%offset%) (- tmpk))
67 (if (> jmin jmax) (go label3))
68 (setf ml
69 (f2cl-lib:int-sub
70 (f2cl-lib:fref ijl-%data% (k) ((1 *)) ijl-%offset%)
71 jmin))
72 (f2cl-lib:fdo (j jmin (f2cl-lib:int-add j 1))
73 ((> j jmax) nil)
74 (tagbody
75 label2
76 (setf (f2cl-lib:fref tmp-%data%
77 ((f2cl-lib:fref jl
78 ((f2cl-lib:int-add ml j))
79 ((1 *))))
80 ((1 *))
81 tmp-%offset%)
83 (f2cl-lib:fref tmp-%data%
84 ((f2cl-lib:fref jl
85 ((f2cl-lib:int-add ml j))
86 ((1 *))))
87 ((1 *))
88 tmp-%offset%)
89 (* tmpk
90 (f2cl-lib:fref l-%data% (j) ((1 *)) l-%offset%))))))
91 label3))
92 (setf k n)
93 (f2cl-lib:fdo (i 1 (f2cl-lib:int-add i 1))
94 ((> i n) nil)
95 (tagbody
96 (setf sum (- (f2cl-lib:fref tmp-%data% (k) ((1 *)) tmp-%offset%)))
97 (setf jmin (f2cl-lib:fref iu-%data% (k) ((1 *)) iu-%offset%))
98 (setf jmax
99 (f2cl-lib:int-sub
100 (f2cl-lib:fref iu-%data%
101 ((f2cl-lib:int-add k 1))
102 ((1 *))
103 iu-%offset%)
105 (if (> jmin jmax) (go label5))
106 (setf mu
107 (f2cl-lib:int-sub
108 (f2cl-lib:fref iju-%data% (k) ((1 *)) iju-%offset%)
109 jmin))
110 (f2cl-lib:fdo (j jmin (f2cl-lib:int-add j 1))
111 ((> j jmax) nil)
112 (tagbody
113 label4
114 (setf sum
115 (+ sum
116 (* (f2cl-lib:fref u-%data% (j) ((1 *)) u-%offset%)
117 (f2cl-lib:fref tmp-%data%
118 ((f2cl-lib:fref ju
119 ((f2cl-lib:int-add
122 ((1 *))))
123 ((1 *))
124 tmp-%offset%))))))
125 label5
126 (setf (f2cl-lib:fref tmp-%data% (k) ((1 *)) tmp-%offset%) (- sum))
127 (setf (f2cl-lib:fref z-%data%
128 ((f2cl-lib:fref c (k) ((1 *))))
129 ((1 *))
130 z-%offset%)
131 (- sum))
132 (setf k (f2cl-lib:int-sub k 1))
133 label6))
134 (go end_label)
135 end_label
136 (return
137 (values nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil)))))
139 (in-package #:cl-user)
140 #+#.(cl:if (cl:find-package '#:f2cl) '(and) '(or))
141 (eval-when (:load-toplevel :compile-toplevel :execute)
142 (setf (gethash 'fortran-to-lisp::nnsc fortran-to-lisp::*f2cl-function-info*)
143 (fortran-to-lisp::make-f2cl-finfo
144 :arg-types '((fortran-to-lisp::integer4)
145 (array fortran-to-lisp::integer4 (*))
146 (array fortran-to-lisp::integer4 (*))
147 (array fortran-to-lisp::integer4 (*))
148 (array fortran-to-lisp::integer4 (*))
149 (array fortran-to-lisp::integer4 (*))
150 (array double-float (*)) (array double-float (*))
151 (array fortran-to-lisp::integer4 (*))
152 (array fortran-to-lisp::integer4 (*))
153 (array fortran-to-lisp::integer4 (*))
154 (array double-float (*)) (array double-float (*))
155 (array double-float (*)) (array double-float (*)))
156 :return-values '(nil nil nil nil nil nil nil nil nil nil nil nil nil
157 nil nil)
158 :calls 'nil)))