Remove the obsolete DEFMTRFUN-EXTERNAL macro
[maxima.git] / share / hompack / lisp / initp.lisp
blob48beee647d1ad79eeb14e85760d0ed8e90486656
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 double-float))
17 (in-package "HOMPACK")
20 (defun initp (iflg1 n numt kdeg coef nn mmaxt par ipar ideg facv cl pdg qdg r)
21 (declare (type (array double-float (*)) r qdg pdg cl facv par coef)
22 (type (array f2cl-lib:integer4 (*)) ideg ipar kdeg numt)
23 (type (f2cl-lib:integer4) mmaxt nn n iflg1))
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 (ipar f2cl-lib:integer4 ipar-%data% ipar-%offset%)
28 (ideg f2cl-lib:integer4 ideg-%data% ideg-%offset%)
29 (coef double-float coef-%data% coef-%offset%)
30 (par double-float par-%data% par-%offset%)
31 (facv double-float facv-%data% facv-%offset%)
32 (cl double-float cl-%data% cl-%offset%)
33 (pdg double-float pdg-%data% pdg-%offset%)
34 (qdg double-float qdg-%data% qdg-%offset%)
35 (r double-float r-%data% r-%offset%))
36 (prog ((p (make-array 20 :element-type 'double-float))
37 (q (make-array 20 :element-type 'double-float))
38 (ccl (make-array 22 :element-type 'double-float)) (zero 0.0) (i 0)
39 (ierr 0) (iideg 0) (j 0) (jj 0) (k 0) (l 0) (n2 0) (np1 0))
40 (declare (type (f2cl-lib:integer4) np1 n2 l k jj j iideg ierr i)
41 (type (double-float) zero)
42 (type (array double-float (22)) ccl)
43 (type (array double-float (20)) q p))
44 (setf zero (coerce 0.0f0 'double-float))
45 (setf n2 (f2cl-lib:int-mul 2 n))
46 (setf np1 (f2cl-lib:int-add n 1))
47 (f2cl-lib:fdo (j 1 (f2cl-lib:int-add j 1))
48 ((> j n) nil)
49 (tagbody
50 (setf (f2cl-lib:fref ideg-%data% (j) ((1 n)) ideg-%offset%) 0)
51 (f2cl-lib:fdo (k 1 (f2cl-lib:int-add k 1))
52 ((> k (f2cl-lib:fref numt (j) ((1 nn)))) nil)
53 (tagbody
54 (setf iideg 0)
55 (f2cl-lib:fdo (l 1 (f2cl-lib:int-add l 1))
56 ((> l n) nil)
57 (tagbody
58 (setf iideg
59 (f2cl-lib:int-add iideg
60 (f2cl-lib:fref kdeg-%data%
61 (j l k)
62 ((1 nn)
64 (f2cl-lib:int-add
66 1))
67 (1 mmaxt))
68 kdeg-%offset%)))
69 label12))
70 (if
71 (> iideg (f2cl-lib:fref ideg-%data% (j) ((1 n)) ideg-%offset%))
72 (setf (f2cl-lib:fref ideg-%data% (j) ((1 n)) ideg-%offset%)
73 iideg))
74 label15))))
75 label15
76 (f2cl-lib:fdo (j 1 (f2cl-lib:int-add j 1))
77 ((> j n) nil)
78 (tagbody
79 (f2cl-lib:fdo (k 1 (f2cl-lib:int-add k 1))
80 ((> k (f2cl-lib:fref numt (j) ((1 nn)))) nil)
81 (tagbody
82 (setf iideg 0)
83 (f2cl-lib:fdo (l 1 (f2cl-lib:int-add l 1))
84 ((> l n) nil)
85 (tagbody
86 (setf iideg
87 (f2cl-lib:int-add iideg
88 (f2cl-lib:fref kdeg-%data%
89 (j l k)
90 ((1 nn)
92 (f2cl-lib:int-add
94 1))
95 (1 mmaxt))
96 kdeg-%offset%)))
97 label22))
98 (setf (f2cl-lib:fref kdeg-%data%
99 (j np1 k)
100 ((1 nn) (1 (f2cl-lib:int-add nn 1))
101 (1 mmaxt))
102 kdeg-%offset%)
103 (f2cl-lib:int-sub
104 (f2cl-lib:fref ideg-%data% (j) ((1 n)) ideg-%offset%)
105 iideg))
106 label25))))
107 label25
108 (cond
109 ((or (= iflg1 10) (= iflg1 0))
110 (f2cl-lib:fdo (i 1 (f2cl-lib:int-add i 1))
111 ((> i n) nil)
112 (tagbody
113 (setf (f2cl-lib:fref facv-%data% (i) ((1 n)) facv-%offset%)
114 (coerce 0.0f0 'double-float))
115 label30)))
117 (multiple-value-bind
118 (var-0 var-1 var-2 var-3 var-4 var-5 var-6 var-7 var-8 var-9
119 var-10 var-11 var-12 var-13 var-14 var-15 var-16 var-17 var-18)
120 (sclgnp n nn mmaxt numt kdeg 0 zero coef
121 (f2cl-lib:array-slice ipar-%data%
122 f2cl-lib:integer4
125 (f2cl-lib:int-add 42
126 (f2cl-lib:int-mul 2 n)
127 (f2cl-lib:int-mul n
128 (f2cl-lib:int-add
131 mmaxt))))
132 ipar-%offset%)
133 (f2cl-lib:array-slice ipar-%data%
134 f2cl-lib:integer4
135 ((+ 1 n))
137 (f2cl-lib:int-add 42
138 (f2cl-lib:int-mul 2 n)
139 (f2cl-lib:int-mul n
140 (f2cl-lib:int-add
143 mmaxt))))
144 ipar-%offset%)
145 (f2cl-lib:array-slice par-%data%
146 double-float
149 (f2cl-lib:int-add 2
150 (f2cl-lib:int-mul 28 n)
151 (f2cl-lib:int-mul 6
152 (expt
155 (f2cl-lib:int-mul 7
157 mmaxt)
158 (f2cl-lib:int-mul 4
159 (expt
162 mmaxt))))
163 par-%offset%)
164 (f2cl-lib:array-slice par-%data%
165 double-float
166 ((+ 1 (f2cl-lib:int-mul n mmaxt)))
168 (f2cl-lib:int-add 2
169 (f2cl-lib:int-mul 28 n)
170 (f2cl-lib:int-mul 6
171 (expt
174 (f2cl-lib:int-mul 7
176 mmaxt)
177 (f2cl-lib:int-mul 4
178 (expt
181 mmaxt))))
182 par-%offset%)
183 (f2cl-lib:array-slice par-%data%
184 double-float
185 ((+ 1
186 (f2cl-lib:int-mul n mmaxt)
187 (f2cl-lib:int-mul 4 (expt n 2))))
189 (f2cl-lib:int-add 2
190 (f2cl-lib:int-mul 28 n)
191 (f2cl-lib:int-mul 6
192 (expt
195 (f2cl-lib:int-mul 7
197 mmaxt)
198 (f2cl-lib:int-mul 4
199 (expt
202 mmaxt))))
203 par-%offset%)
204 (f2cl-lib:array-slice par-%data%
205 double-float
206 ((+ 1
207 (f2cl-lib:int-mul n mmaxt)
208 (f2cl-lib:int-mul 4 (expt n 2))
209 (f2cl-lib:int-mul 2 n)))
211 (f2cl-lib:int-add 2
212 (f2cl-lib:int-mul 28 n)
213 (f2cl-lib:int-mul 6
214 (expt
217 (f2cl-lib:int-mul 7
219 mmaxt)
220 (f2cl-lib:int-mul 4
221 (expt
224 mmaxt))))
225 par-%offset%)
226 (f2cl-lib:array-slice par-%data%
227 double-float
228 ((+ 1
229 (f2cl-lib:int-mul n mmaxt)
230 (f2cl-lib:int-mul 4 (expt n 2))
231 (f2cl-lib:int-mul 2 n)
232 (f2cl-lib:int-mul n
233 (f2cl-lib:int-add
234 (f2cl-lib:int-mul 2
236 1))))
238 (f2cl-lib:int-add 2
239 (f2cl-lib:int-mul 28 n)
240 (f2cl-lib:int-mul 6
241 (expt
244 (f2cl-lib:int-mul 7
246 mmaxt)
247 (f2cl-lib:int-mul 4
248 (expt
251 mmaxt))))
252 par-%offset%)
253 facv
254 (f2cl-lib:array-slice par-%data%
255 double-float
256 ((+ 1
257 (f2cl-lib:int-mul n mmaxt)
258 (f2cl-lib:int-mul 4 (expt n 2))
259 (f2cl-lib:int-mul 4 n)
260 (f2cl-lib:int-mul n
261 (f2cl-lib:int-add
262 (f2cl-lib:int-mul 2
264 1))))
266 (f2cl-lib:int-add 2
267 (f2cl-lib:int-mul 28 n)
268 (f2cl-lib:int-mul 6
269 (expt
272 (f2cl-lib:int-mul 7
274 mmaxt)
275 (f2cl-lib:int-mul 4
276 (expt
279 mmaxt))))
280 par-%offset%)
281 (f2cl-lib:array-slice par-%data%
282 double-float
283 ((+ 1
284 (f2cl-lib:int-mul n mmaxt)
285 (f2cl-lib:int-mul 4 (expt n 2))
286 (f2cl-lib:int-mul 5 n)
287 (f2cl-lib:int-mul n
288 (f2cl-lib:int-add
289 (f2cl-lib:int-mul 2
291 1))))
293 (f2cl-lib:int-add 2
294 (f2cl-lib:int-mul 28 n)
295 (f2cl-lib:int-mul 6
296 (expt
299 (f2cl-lib:int-mul 7
301 mmaxt)
302 (f2cl-lib:int-mul 4
303 (expt
306 mmaxt))))
307 par-%offset%)
308 ierr)
309 (declare (ignore var-0 var-1 var-2 var-3 var-4 var-5 var-6 var-7
310 var-8 var-9 var-10 var-11 var-12 var-13 var-14
311 var-15 var-16 var-17))
312 (setf ierr var-18))
313 (cond
314 ((= ierr 0)
315 (tagbody
316 (f2cl-lib:fdo (j 1 (f2cl-lib:int-add j 1))
317 ((> j n) nil)
318 (tagbody
319 (f2cl-lib:fdo (k 1 (f2cl-lib:int-add k 1))
320 ((> k (f2cl-lib:fref numt (j) ((1 nn)))) nil)
321 (tagbody
322 (setf (f2cl-lib:fref coef-%data%
323 (j k)
324 ((1 nn) (1 mmaxt))
325 coef-%offset%)
326 (f2cl-lib:fref par-%data%
327 ((f2cl-lib:int-add
328 (f2cl-lib:int-mul n mmaxt)
329 (f2cl-lib:int-mul 4 (expt n 2))
330 (f2cl-lib:int-mul 5 n)
331 (f2cl-lib:int-mul n
332 (f2cl-lib:int-add
333 (f2cl-lib:int-mul
338 (f2cl-lib:int-mul n
339 (f2cl-lib:int-sub
341 1))))
343 (f2cl-lib:int-add 2
344 (f2cl-lib:int-mul
347 (f2cl-lib:int-mul
349 (expt n 2))
350 (f2cl-lib:int-mul
353 mmaxt)
354 (f2cl-lib:int-mul
356 (expt n 2)
357 mmaxt))))
358 par-%offset%))
359 label40))))
360 label40)))))
361 (setf (f2cl-lib:fref p (1 1) ((1 2) (1 10))) 0.12324754231)
362 (setf (f2cl-lib:fref p (2 1) ((1 2) (1 10))) 0.76253746298)
363 (setf (f2cl-lib:fref p (1 2) ((1 2) (1 10))) 0.9385783895)
364 (setf (f2cl-lib:fref p (2 2) ((1 2) (1 10))) -0.9937589281)
365 (setf (f2cl-lib:fref p (1 3) ((1 2) (1 10))) -0.23467908356)
366 (setf (f2cl-lib:fref p (2 3) ((1 2) (1 10))) 0.39383930009)
367 (setf (f2cl-lib:fref p (1 4) ((1 2) (1 10))) 0.83542556622)
368 (setf (f2cl-lib:fref p (2 4) ((1 2) (1 10))) -0.10192888288)
369 (setf (f2cl-lib:fref p (1 5) ((1 2) (1 10))) -0.55763522521)
370 (setf (f2cl-lib:fref p (2 5) ((1 2) (1 10))) -0.83729899911)
371 (setf (f2cl-lib:fref p (1 6) ((1 2) (1 10))) -0.78348738738)
372 (setf (f2cl-lib:fref p (2 6) ((1 2) (1 10))) -0.10578234903)
373 (setf (f2cl-lib:fref p (1 7) ((1 2) (1 10))) 0.03938347346)
374 (setf (f2cl-lib:fref p (2 7) ((1 2) (1 10))) 0.04825184716)
375 (setf (f2cl-lib:fref p (1 8) ((1 2) (1 10))) -0.43428734331)
376 (setf (f2cl-lib:fref p (2 8) ((1 2) (1 10))) 0.93836289418)
377 (setf (f2cl-lib:fref p (1 9) ((1 2) (1 10))) -0.99383729993)
378 (setf (f2cl-lib:fref p (2 9) ((1 2) (1 10))) -0.40947822291)
379 (setf (f2cl-lib:fref p (1 10) ((1 2) (1 10))) 0.09383736736)
380 (setf (f2cl-lib:fref p (2 10) ((1 2) (1 10))) 0.26459172298)
381 (setf (f2cl-lib:fref q (1 1) ((1 2) (1 10))) 0.58720452864)
382 (setf (f2cl-lib:fref q (2 1) ((1 2) (1 10))) 0.01321964722)
383 (setf (f2cl-lib:fref q (1 2) ((1 2) (1 10))) 0.978841347)
384 (setf (f2cl-lib:fref q (2 2) ((1 2) (1 10))) -0.14433009712)
385 (setf (f2cl-lib:fref q (1 3) ((1 2) (1 10))) 0.39383737289)
386 (setf (f2cl-lib:fref q (2 3) ((1 2) (1 10))) 0.41543223411)
387 (setf (f2cl-lib:fref q (1 4) ((1 2) (1 10))) -0.03938376373)
388 (setf (f2cl-lib:fref q (2 4) ((1 2) (1 10))) -0.61253112318)
389 (setf (f2cl-lib:fref q (1 5) ((1 2) (1 10))) 0.39383737388)
390 (setf (f2cl-lib:fref q (2 5) ((1 2) (1 10))) -0.26454678861)
391 (setf (f2cl-lib:fref q (1 6) ((1 2) (1 10))) -0.00938376766)
392 (setf (f2cl-lib:fref q (2 6) ((1 2) (1 10))) 0.34447867861)
393 (setf (f2cl-lib:fref q (1 7) ((1 2) (1 10))) -0.04837366632)
394 (setf (f2cl-lib:fref q (2 7) ((1 2) (1 10))) 0.4825273679)
395 (setf (f2cl-lib:fref q (1 8) ((1 2) (1 10))) 0.93725237347)
396 (setf (f2cl-lib:fref q (2 8) ((1 2) (1 10))) -0.54356527623)
397 (setf (f2cl-lib:fref q (1 9) ((1 2) (1 10))) 0.39373957747)
398 (setf (f2cl-lib:fref q (2 9) ((1 2) (1 10))) 0.65573434564)
399 (setf (f2cl-lib:fref q (1 10) ((1 2) (1 10))) -0.39380038371)
400 (setf (f2cl-lib:fref q (2 10) ((1 2) (1 10))) 0.98903450052)
401 (setf (f2cl-lib:fref ccl (1 1) ((1 2) (1 11))) -0.03485644332)
402 (setf (f2cl-lib:fref ccl (2 1) ((1 2) (1 11))) 0.28554634336)
403 (setf (f2cl-lib:fref ccl (1 2) ((1 2) (1 11))) 0.91453454766)
404 (setf (f2cl-lib:fref ccl (2 2) ((1 2) (1 11))) 0.35354566613)
405 (setf (f2cl-lib:fref ccl (1 3) ((1 2) (1 11))) -0.36568737635)
406 (setf (f2cl-lib:fref ccl (2 3) ((1 2) (1 11))) 0.45634642477)
407 (setf (f2cl-lib:fref ccl (1 4) ((1 2) (1 11))) -0.89089767544)
408 (setf (f2cl-lib:fref ccl (2 4) ((1 2) (1 11))) 0.34524523544)
409 (setf (f2cl-lib:fref ccl (1 5) ((1 2) (1 11))) 0.13523462465)
410 (setf (f2cl-lib:fref ccl (2 5) ((1 2) (1 11))) 0.43534535555)
411 (setf (f2cl-lib:fref ccl (1 6) ((1 2) (1 11))) -0.34523544445)
412 (setf (f2cl-lib:fref ccl (2 6) ((1 2) (1 11))) 0.00734522256)
413 (setf (f2cl-lib:fref ccl (1 7) ((1 2) (1 11))) -0.80004678763)
414 (setf (f2cl-lib:fref ccl (2 7) ((1 2) (1 11))) -0.009387123644)
415 (setf (f2cl-lib:fref ccl (1 8) ((1 2) (1 11))) -0.875432124245)
416 (setf (f2cl-lib:fref ccl (2 8) ((1 2) (1 11))) 4.5687651e-4)
417 (setf (f2cl-lib:fref ccl (1 9) ((1 2) (1 11))) 0.65256352333)
418 (setf (f2cl-lib:fref ccl (2 9) ((1 2) (1 11))) -0.12356777452)
419 (setf (f2cl-lib:fref ccl (1 10) ((1 2) (1 11))) 0.09986798321548)
420 (setf (f2cl-lib:fref ccl (2 10) ((1 2) (1 11))) -0.56753456577)
421 (setf (f2cl-lib:fref ccl (1 11) ((1 2) (1 11))) 0.29674947394739)
422 (setf (f2cl-lib:fref ccl (2 11) ((1 2) (1 11))) 0.93274302173)
423 (cond
424 ((or (= iflg1 1) (= iflg1 0))
425 (tagbody
426 (f2cl-lib:fdo (i 1 (f2cl-lib:int-add i 1))
427 ((> i 2) nil)
428 (tagbody
429 (f2cl-lib:fdo (j 1 (f2cl-lib:int-add j 1))
430 ((> j n) nil)
431 (tagbody
432 (setf (f2cl-lib:fref cl-%data%
433 (i j)
434 ((1 2) (1 (f2cl-lib:int-add n 1)))
435 cl-%offset%)
436 (coerce 0.0f0 'double-float))
437 label50))))
438 label50
439 (setf (f2cl-lib:fref cl-%data%
440 (1 np1)
441 ((1 2) (1 (f2cl-lib:int-add n 1)))
442 cl-%offset%)
443 (coerce 1.0f0 'double-float))
444 (setf (f2cl-lib:fref cl-%data%
445 (2 np1)
446 ((1 2) (1 (f2cl-lib:int-add n 1)))
447 cl-%offset%)
448 (coerce 0.0f0 'double-float))))
450 (tagbody
451 (f2cl-lib:fdo (j 1 (f2cl-lib:int-add j 1))
452 ((> j np1) nil)
453 (tagbody
454 (setf jj (f2cl-lib:int-add (mod (f2cl-lib:int-sub j 1) 11) 1))
455 (f2cl-lib:fdo (i 1 (f2cl-lib:int-add i 1))
456 ((> i 2) nil)
457 (tagbody
458 (setf (f2cl-lib:fref cl-%data%
459 (i j)
460 ((1 2) (1 (f2cl-lib:int-add n 1)))
461 cl-%offset%)
462 (f2cl-lib:fref ccl (i jj) ((1 2) (1 11))))
463 label60))))
464 label60)))
465 (f2cl-lib:fdo (j 1 (f2cl-lib:int-add j 1))
466 ((> j n) nil)
467 (tagbody
468 (setf jj (f2cl-lib:int-add (mod (f2cl-lib:int-sub j 1) 10) 1))
469 (powp (f2cl-lib:fref ideg-%data% (j) ((1 n)) ideg-%offset%)
470 (f2cl-lib:array-slice p double-float (1 jj) ((1 2) (1 10)))
471 (f2cl-lib:array-slice pdg-%data%
472 double-float
473 (1 j)
474 ((1 2) (1 n))
475 pdg-%offset%))
476 (powp (f2cl-lib:fref ideg-%data% (j) ((1 n)) ideg-%offset%)
477 (f2cl-lib:array-slice q double-float (1 jj) ((1 2) (1 10)))
478 (f2cl-lib:array-slice qdg-%data%
479 double-float
480 (1 j)
481 ((1 2) (1 n))
482 qdg-%offset%))
483 (multiple-value-bind (var-0 var-1 var-2 var-3)
484 (divp (f2cl-lib:array-slice q double-float (1 jj) ((1 2) (1 10)))
485 (f2cl-lib:array-slice p double-float (1 jj) ((1 2) (1 10)))
486 (f2cl-lib:array-slice r-%data%
487 double-float
488 (1 j)
489 ((1 2) (1 n))
490 r-%offset%)
491 ierr)
492 (declare (ignore var-0 var-1 var-2))
493 (setf ierr var-3))
494 label70))
495 (go end_label)
496 end_label
497 (return
498 (values nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil)))))
500 (in-package #:cl-user)
501 #+#.(cl:if (cl:find-package '#:f2cl) '(and) '(or))
502 (eval-when (:load-toplevel :compile-toplevel :execute)
503 (setf (gethash 'fortran-to-lisp::initp fortran-to-lisp::*f2cl-function-info*)
504 (fortran-to-lisp::make-f2cl-finfo
505 :arg-types '((fortran-to-lisp::integer4) (fortran-to-lisp::integer4)
506 (array fortran-to-lisp::integer4 (*))
507 (array fortran-to-lisp::integer4 (*))
508 (array double-float (*)) (fortran-to-lisp::integer4)
509 (fortran-to-lisp::integer4) (array double-float (*))
510 (array fortran-to-lisp::integer4 (*))
511 (array fortran-to-lisp::integer4 (*))
512 (array double-float (*)) (array double-float (*))
513 (array double-float (*)) (array double-float (*))
514 (array double-float (*)))
515 :return-values '(nil nil nil nil nil nil nil nil nil nil nil nil nil
516 nil nil)
517 :calls '(fortran-to-lisp::divp fortran-to-lisp::powp
518 fortran-to-lisp::sclgnp))))