Fix possible lisp error when translating entier
[maxima.git] / share / hompack / lisp / qrslqf.lisp
blob681f9c426837a10b3c099f10d5725608672edc71
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 qrslqf (qt r b x n)
21 (declare (type (f2cl-lib:integer4) n)
22 (type (array double-float (*)) x b r qt))
23 (f2cl-lib:with-multi-array-data
24 ((qt double-float qt-%data% qt-%offset%)
25 (r double-float r-%data% r-%offset%)
26 (b double-float b-%data% b-%offset%)
27 (x double-float x-%data% x-%offset%))
28 (prog ((indexr 0) (i 0) (j 0) (tau 0.0))
29 (declare (type (double-float) tau) (type (f2cl-lib:integer4) j i indexr))
30 (f2cl-lib:fdo (i 1 (f2cl-lib:int-add i 1))
31 ((> i n) nil)
32 (tagbody
33 (setf (f2cl-lib:fref x-%data% (i) ((1 n)) x-%offset%)
34 (ddot n
35 (f2cl-lib:array-slice qt-%data%
36 double-float
37 (i 1)
38 ((1 n) (1 n))
39 qt-%offset%)
40 n b 1))
41 label10))
42 (setf indexr (the f2cl-lib:integer4 (truncate (* n (+ n 1)) 2)))
43 (setf (f2cl-lib:fref b-%data% (n) ((1 n)) b-%offset%)
44 (/ (f2cl-lib:fref x-%data% (n) ((1 n)) x-%offset%)
45 (f2cl-lib:fref r-%data%
46 (indexr)
47 ((1
48 (f2cl-lib:f2cl/
49 (f2cl-lib:int-mul n (f2cl-lib:int-add n 1))
50 2)))
51 r-%offset%)))
52 (setf indexr (f2cl-lib:int-sub indexr 1))
53 (f2cl-lib:fdo (i (f2cl-lib:int-add n (f2cl-lib:int-sub 1))
54 (f2cl-lib:int-add i (f2cl-lib:int-sub 1)))
55 ((> i 1) nil)
56 (tagbody
57 (setf tau (f2cl-lib:fref x-%data% (i) ((1 n)) x-%offset%))
58 (f2cl-lib:fdo (j n (f2cl-lib:int-add j (f2cl-lib:int-sub 1)))
59 ((> j (f2cl-lib:int-add i 1)) nil)
60 (tagbody
61 (setf tau
62 (- tau
64 (f2cl-lib:fref r-%data%
65 (indexr)
66 ((1
67 (f2cl-lib:f2cl/
68 (f2cl-lib:int-mul n
69 (f2cl-lib:int-add
71 1))
72 2)))
73 r-%offset%)
74 (f2cl-lib:fref b-%data% (j) ((1 n)) b-%offset%))))
75 (setf indexr (f2cl-lib:int-sub indexr 1))
76 label20))
77 (setf (f2cl-lib:fref b-%data% (i) ((1 n)) b-%offset%)
78 (/ tau
79 (f2cl-lib:fref r-%data%
80 (indexr)
81 ((1
82 (f2cl-lib:f2cl/
83 (f2cl-lib:int-mul n
84 (f2cl-lib:int-add n
85 1))
86 2)))
87 r-%offset%)))
88 (setf indexr (f2cl-lib:int-sub indexr 1))
89 label30))
90 (go end_label)
91 end_label
92 (return (values nil nil nil nil nil)))))
94 (in-package #:cl-user)
95 #+#.(cl:if (cl:find-package '#:f2cl) '(and) '(or))
96 (eval-when (:load-toplevel :compile-toplevel :execute)
97 (setf (gethash 'fortran-to-lisp::qrslqf
98 fortran-to-lisp::*f2cl-function-info*)
99 (fortran-to-lisp::make-f2cl-finfo
100 :arg-types '((array double-float (*)) (array double-float (*))
101 (array double-float (*)) (array double-float (*))
102 (fortran-to-lisp::integer4))
103 :return-values '(nil nil nil nil nil)
104 :calls '(fortran-to-lisp::ddot))))