matrix-div.lisp 8.59 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11
;; Regression test MATRIX-DIV for GSLL, automatically generated

(in-package :gsl)

(LISP-UNIT:DEFINE-TEST MATRIX-DIV
                       (LISP-UNIT::ASSERT-NUMERICAL-EQUAL
                        (LIST
                         #2A((-0.8073953 -0.47795823 0.075963974)
                             (0.5539702 -4.1357574 -0.28684703)
                             (-1.0038712 0.3401412 -0.6570967)))
                        (MULTIPLE-VALUE-LIST
Liam Healy's avatar
Liam Healy committed
12 13 14 15 16 17 18 19 20 21 22
                         (LET ((M1
                                (MAKE-MARRAY 'SINGLE-FLOAT :INITIAL-CONTENTS
                                             '((-34.5 8.24 3.29)
                                               (-8.93 34.12 -6.15)
                                               (49.27 -13.49 32.5))))
                               (M2
                                (MAKE-MARRAY 'SINGLE-FLOAT :INITIAL-CONTENTS
                                             '((42.73 -17.24 43.31)
                                               (-16.12 -8.25 21.44)
                                               (-49.08 -39.66 -49.46)))))
                           (CL-ARRAY (M/ M1 M2)))))
23 24 25 26 27 28 29 30 31
                       (LISP-UNIT::ASSERT-NUMERICAL-EQUAL
                        (LIST
                         #2A((-0.8073952726421718d0 -0.4779582366589328d0
                              0.07596398060494113d0)
                             (0.553970223325062d0 -4.135757575757576d0
                              -0.2868470149253731d0)
                             (-1.0038712306438469d0 0.3401412002017146d0
                              -0.6570966437525273d0)))
                        (MULTIPLE-VALUE-LIST
Liam Healy's avatar
Liam Healy committed
32 33 34 35 36 37 38 39 40 41 42
                         (LET ((M1
                                (MAKE-MARRAY 'DOUBLE-FLOAT :INITIAL-CONTENTS
                                             '((-34.5d0 8.24d0 3.29d0)
                                               (-8.93d0 34.12d0 -6.15d0)
                                               (49.27d0 -13.49d0 32.5d0))))
                               (M2
                                (MAKE-MARRAY 'DOUBLE-FLOAT :INITIAL-CONTENTS
                                             '((42.73d0 -17.24d0 43.31d0)
                                               (-16.12d0 -8.25d0 21.44d0)
                                               (-49.08d0 -39.66d0 -49.46d0)))))
                           (CL-ARRAY (M/ M1 M2)))))
43 44 45
                       (LISP-UNIT::ASSERT-NUMERICAL-EQUAL
                        (LIST #2A((-2 -2 2) (-2 0 1) (-4 0 1)))
                        (MULTIPLE-VALUE-LIST
Liam Healy's avatar
Liam Healy committed
46 47 48 49 50 51 52 53 54
                         (LET ((M1
                                (MAKE-MARRAY '(SIGNED-BYTE 8) :INITIAL-CONTENTS
                                             '((-64 -68 71) (-91 52 -10)
                                               (73 -5 123))))
                               (M2
                                (MAKE-MARRAY '(SIGNED-BYTE 8) :INITIAL-CONTENTS
                                             '((32 28 30) (37 -73 -8)
                                               (-15 -22 68)))))
                           (CL-ARRAY (M/ M1 M2)))))
55 56 57
                       (LISP-UNIT::ASSERT-NUMERICAL-EQUAL
                        (LIST #2A((2 4 9) (4 0 0) (4 1 0)))
                        (MULTIPLE-VALUE-LIST
Liam Healy's avatar
Liam Healy committed
58 59 60 61 62 63 64 65 66 67 68
                         (LET ((M1
                                (MAKE-MARRAY '(UNSIGNED-BYTE 8)
                                             :INITIAL-CONTENTS
                                             '((67 44 189) (116 163 140)
                                               (161 215 98))))
                               (M2
                                (MAKE-MARRAY '(UNSIGNED-BYTE 8)
                                             :INITIAL-CONTENTS
                                             '((28 10 19) (28 178 217)
                                               (36 109 222)))))
                           (CL-ARRAY (M/ M1 M2)))))
69 70 71
                       (LISP-UNIT::ASSERT-NUMERICAL-EQUAL
                        (LIST #2A((-2 -2 2) (-2 0 1) (-4 0 1)))
                        (MULTIPLE-VALUE-LIST
Liam Healy's avatar
Liam Healy committed
72 73 74 75 76 77 78 79 80 81 82
                         (LET ((M1
                                (MAKE-MARRAY '(SIGNED-BYTE 16)
                                             :INITIAL-CONTENTS
                                             '((-64 -68 71) (-91 52 -10)
                                               (73 -5 123))))
                               (M2
                                (MAKE-MARRAY '(SIGNED-BYTE 16)
                                             :INITIAL-CONTENTS
                                             '((32 28 30) (37 -73 -8)
                                               (-15 -22 68)))))
                           (CL-ARRAY (M/ M1 M2)))))
83 84 85
                       (LISP-UNIT::ASSERT-NUMERICAL-EQUAL
                        (LIST #2A((2 4 9) (4 0 0) (4 1 0)))
                        (MULTIPLE-VALUE-LIST
Liam Healy's avatar
Liam Healy committed
86 87 88 89 90 91 92 93 94 95 96
                         (LET ((M1
                                (MAKE-MARRAY '(UNSIGNED-BYTE 16)
                                             :INITIAL-CONTENTS
                                             '((67 44 189) (116 163 140)
                                               (161 215 98))))
                               (M2
                                (MAKE-MARRAY '(UNSIGNED-BYTE 16)
                                             :INITIAL-CONTENTS
                                             '((28 10 19) (28 178 217)
                                               (36 109 222)))))
                           (CL-ARRAY (M/ M1 M2)))))
97 98 99
                       (LISP-UNIT::ASSERT-NUMERICAL-EQUAL
                        (LIST #2A((-2 -2 2) (-2 0 1) (-4 0 1)))
                        (MULTIPLE-VALUE-LIST
Liam Healy's avatar
Liam Healy committed
100 101 102 103 104 105 106 107 108 109 110
                         (LET ((M1
                                (MAKE-MARRAY '(SIGNED-BYTE 32)
                                             :INITIAL-CONTENTS
                                             '((-64 -68 71) (-91 52 -10)
                                               (73 -5 123))))
                               (M2
                                (MAKE-MARRAY '(SIGNED-BYTE 32)
                                             :INITIAL-CONTENTS
                                             '((32 28 30) (37 -73 -8)
                                               (-15 -22 68)))))
                           (CL-ARRAY (M/ M1 M2)))))
111 112 113
                       (LISP-UNIT::ASSERT-NUMERICAL-EQUAL
                        (LIST #2A((2 4 9) (4 0 0) (4 1 0)))
                        (MULTIPLE-VALUE-LIST
Liam Healy's avatar
Liam Healy committed
114 115 116 117 118 119 120 121 122 123 124
                         (LET ((M1
                                (MAKE-MARRAY '(UNSIGNED-BYTE 32)
                                             :INITIAL-CONTENTS
                                             '((67 44 189) (116 163 140)
                                               (161 215 98))))
                               (M2
                                (MAKE-MARRAY '(UNSIGNED-BYTE 32)
                                             :INITIAL-CONTENTS
                                             '((28 10 19) (28 178 217)
                                               (36 109 222)))))
                           (CL-ARRAY (M/ M1 M2)))))
125
		       #+int64
126 127 128
                       (LISP-UNIT::ASSERT-NUMERICAL-EQUAL
                        (LIST #2A((-2 -2 2) (-2 0 1) (-4 0 1)))
                        (MULTIPLE-VALUE-LIST
Liam Healy's avatar
Liam Healy committed
129 130 131 132 133 134 135 136 137 138 139
                         (LET ((M1
                                (MAKE-MARRAY '(SIGNED-BYTE 64)
                                             :INITIAL-CONTENTS
                                             '((-64 -68 71) (-91 52 -10)
                                               (73 -5 123))))
                               (M2
                                (MAKE-MARRAY '(SIGNED-BYTE 64)
                                             :INITIAL-CONTENTS
                                             '((32 28 30) (37 -73 -8)
                                               (-15 -22 68)))))
                           (CL-ARRAY (M/ M1 M2)))))
140
		       #+int64
141 142 143
                       (LISP-UNIT::ASSERT-NUMERICAL-EQUAL
                        (LIST #2A((2 4 9) (4 0 0) (4 1 0)))
                        (MULTIPLE-VALUE-LIST
Liam Healy's avatar
Liam Healy committed
144 145 146 147 148 149 150 151 152 153 154
                         (LET ((M1
                                (MAKE-MARRAY '(UNSIGNED-BYTE 64)
                                             :INITIAL-CONTENTS
                                             '((67 44 189) (116 163 140)
                                               (161 215 98))))
                               (M2
                                (MAKE-MARRAY '(UNSIGNED-BYTE 64)
                                             :INITIAL-CONTENTS
                                             '((28 10 19) (28 178 217)
                                               (36 109 222)))))
                           (CL-ARRAY (M/ M1 M2))))))
155