Add some basic letsimp tests based on bug #3950
[maxima.git] / share / colnew / lisp / appsln.lisp
blobd734f7589cdbd8dc30a9d35fedbe4a73852e5347
1 ;;; Compiled by f2cl version:
2 ;;; ("f2cl1.l,v 1.221 2010/05/26 19:25:52 rtoy Exp $"
3 ;;; "f2cl2.l,v 1.37 2008/02/22 22:19:33 rtoy Exp $"
4 ;;; "f2cl3.l,v 1.6 2008/02/22 22:19:33 rtoy Exp $"
5 ;;; "f2cl4.l,v 1.7 2008/02/22 22:19:34 rtoy Exp $"
6 ;;; "f2cl5.l,v 1.204 2010/02/23 05:21:30 rtoy Exp $"
7 ;;; "f2cl6.l,v 1.48 2008/08/24 00:56:27 rtoy Exp $"
8 ;;; "macros.l,v 1.114 2010/05/17 01:42:14 rtoy Exp $")
10 ;;; Using Lisp CMU Common Lisp CVS Head 2010-05-25 18:21:07 (20A 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 :colnew)
20 (defun appsln (x z fspace ispace)
21 (declare (type (array f2cl-lib:integer4 (*)) ispace)
22 (type (array double-float (*)) fspace z)
23 (type double-float x))
24 (f2cl-lib:with-multi-array-data
25 ((z double-float z-%data% z-%offset%)
26 (fspace double-float fspace-%data% fspace-%offset%)
27 (ispace f2cl-lib:integer4 ispace-%data% ispace-%offset%))
28 (prog ((a (make-array 28 :element-type 'double-float))
29 (dummy (make-array 1 :element-type 'double-float)) (i 0) (is4 0)
30 (is5 0) (is6 0))
31 (declare (type (f2cl-lib:integer4) is6 is5 is4 i)
32 (type (array double-float (1)) dummy)
33 (type (array double-float (28)) a))
34 (setf is6 (f2cl-lib:fref ispace-%data% (6) ((1 1)) ispace-%offset%))
35 (setf is5
36 (f2cl-lib:int-add
37 (f2cl-lib:fref ispace-%data% (1) ((1 1)) ispace-%offset%)
38 2))
39 (setf is4
40 (f2cl-lib:int-add is5
41 (f2cl-lib:int-mul
42 (f2cl-lib:fref ispace-%data%
43 (4)
44 ((1 1))
45 ispace-%offset%)
46 (f2cl-lib:int-add
47 (f2cl-lib:fref ispace-%data%
48 (1)
49 ((1 1))
50 ispace-%offset%)
51 1))))
52 (setf i 1)
53 (multiple-value-bind
54 (var-0 var-1 var-2 var-3 var-4 var-5 var-6 var-7 var-8 var-9 var-10
55 var-11 var-12 var-13 var-14 var-15 var-16)
56 (approx i x z a
57 (f2cl-lib:array-slice fspace double-float (is6) ((1 1)))
58 (f2cl-lib:array-slice fspace double-float (1) ((1 1)))
59 (f2cl-lib:fref ispace-%data% (1) ((1 1)) ispace-%offset%)
60 (f2cl-lib:array-slice fspace double-float (is5) ((1 1)))
61 (f2cl-lib:array-slice fspace double-float (is4) ((1 1)))
62 (f2cl-lib:fref ispace-%data% (2) ((1 1)) ispace-%offset%)
63 (f2cl-lib:fref ispace-%data% (3) ((1 1)) ispace-%offset%)
64 (f2cl-lib:fref ispace-%data% (5) ((1 1)) ispace-%offset%)
65 (f2cl-lib:array-slice ispace f2cl-lib:integer4 (8) ((1 1)))
66 (f2cl-lib:fref ispace-%data% (4) ((1 1)) ispace-%offset%) 2 dummy 0)
67 (declare (ignore var-2 var-3 var-4 var-5 var-6 var-7 var-8 var-9 var-10
68 var-11 var-12 var-13 var-14 var-15 var-16))
69 (setf i var-0)
70 (setf x var-1))
71 (go end_label)
72 end_label
73 (return (values x nil nil nil)))))
75 (in-package #-gcl #:cl-user #+gcl "CL-USER")
76 #+#.(cl:if (cl:find-package '#:f2cl) '(and) '(or))
77 (eval-when (:load-toplevel :compile-toplevel :execute)
78 (setf (gethash 'fortran-to-lisp::appsln
79 fortran-to-lisp::*f2cl-function-info*)
80 (fortran-to-lisp::make-f2cl-finfo
81 :arg-types '(double-float (array double-float (1))
82 (array double-float (1))
83 (array fortran-to-lisp::integer4 (1)))
84 :return-values '(fortran-to-lisp::x nil nil nil)
85 :calls '(fortran-to-lisp::approx))))