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

(in-package :gsl)

(LISP-UNIT:DEFINE-TEST MATRIX-MULT
                       (LISP-UNIT::ASSERT-NUMERICAL-EQUAL
                        (LIST
                         #2A((-1474.1849 -142.05759 142.4899)
                             (143.95161 -281.49 -131.856)
                             (-2418.1716 535.01337 -1607.45)))
                        (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
                       (LISP-UNIT::ASSERT-NUMERICAL-EQUAL
                        (LIST
                         #2A((-1474.185d0 -142.05759999999998d0 142.4899d0)
                             (143.9516d0 -281.48999999999995d0
                              -131.85600000000002d0)
                             (-2418.1716d0 535.0133999999999d0 -1607.45d0)))
                        (MULTIPLE-VALUE-LIST
Liam Healy's avatar
Liam Healy committed
30 31 32 33 34 35 36 37 38 39 40
                         (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)))))
41 42 43
                       (LISP-UNIT::ASSERT-NUMERICAL-EQUAL
                        (LIST #2A((0 -112 82) (-39 44 80) (-71 110 -84)))
                        (MULTIPLE-VALUE-LIST
Liam Healy's avatar
Liam Healy committed
44 45 46 47 48 49 50 51 52
                         (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)))))
53 54 55
                       (LISP-UNIT::ASSERT-NUMERICAL-EQUAL
                        (LIST #2A((84 184 7) (176 86 172) (164 139 252)))
                        (MULTIPLE-VALUE-LIST
Liam Healy's avatar
Liam Healy committed
56 57 58 59 60 61 62 63 64 65 66
                         (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)))))
67 68 69 70 71 72
                       (LISP-UNIT::ASSERT-NUMERICAL-EQUAL
                        (LIST
                         #2A((-2048 -1904 2130)
                             (-3367 -3796 80)
                             (-1095 110 8364)))
                        (MULTIPLE-VALUE-LIST
Liam Healy's avatar
Liam Healy committed
73 74 75 76 77 78 79 80 81 82 83
                         (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)))))
84 85 86 87 88 89
                       (LISP-UNIT::ASSERT-NUMERICAL-EQUAL
                        (LIST
                         #2A((1876 440 3591)
                             (3248 29014 30380)
                             (5796 23435 21756)))
                        (MULTIPLE-VALUE-LIST
Liam Healy's avatar
Liam Healy committed
90 91 92 93 94 95 96 97 98 99 100
                         (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)))))
101 102 103 104 105 106
                       (LISP-UNIT::ASSERT-NUMERICAL-EQUAL
                        (LIST
                         #2A((-2048 -1904 2130)
                             (-3367 -3796 80)
                             (-1095 110 8364)))
                        (MULTIPLE-VALUE-LIST
Liam Healy's avatar
Liam Healy committed
107 108 109 110 111 112 113 114 115 116 117
                         (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)))))
118 119 120 121 122 123
                       (LISP-UNIT::ASSERT-NUMERICAL-EQUAL
                        (LIST
                         #2A((1876 440 3591)
                             (3248 29014 30380)
                             (5796 23435 21756)))
                        (MULTIPLE-VALUE-LIST
Liam Healy's avatar
Liam Healy committed
124 125 126 127 128 129 130 131 132 133 134
                         (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)))))
135
		       #+int64
136 137 138 139 140 141
                       (LISP-UNIT::ASSERT-NUMERICAL-EQUAL
                        (LIST
                         #2A((-2048 -1904 2130)
                             (-3367 -3796 80)
                             (-1095 110 8364)))
                        (MULTIPLE-VALUE-LIST
Liam Healy's avatar
Liam Healy committed
142 143 144 145 146 147 148 149 150 151 152
                         (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)))))
153
		       #+int64
154 155 156 157 158 159
                       (LISP-UNIT::ASSERT-NUMERICAL-EQUAL
                        (LIST
                         #2A((1876 440 3591)
                             (3248 29014 30380)
                             (5796 23435 21756)))
                        (MULTIPLE-VALUE-LIST
Liam Healy's avatar
Liam Healy committed
160 161 162 163 164 165 166 167 168 169 170
                         (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))))))
171