matrix-m+.lisp 8.57 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11
;; Regression test MATRIX-M+ for GSLL, automatically generated

(in-package :gsl)

(LISP-UNIT:DEFINE-TEST MATRIX-M+
                       (LISP-UNIT::ASSERT-NUMERICAL-EQUAL
                        (LIST
                         #2A((8.23 -9.0 46.600002)
                             (-25.050001 25.869999 15.290001)
                             (0.18999863 -53.15 -16.96)))
                        (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((8.229999999999997d0 -8.999999999999998d0 46.6d0)
                             (-25.05d0 25.869999999999997d0
                              15.290000000000001d0)
                             (0.19000000000000483d0 -53.15d0 -16.96d0)))
                        (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((-32 -40 101) (-54 -21 -18) (58 -27 -65)))
                        (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((95 54 208) (144 85 101) (197 68 64)))
                        (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
                       (LISP-UNIT::ASSERT-NUMERICAL-EQUAL
                        (LIST #2A((-32 -40 101) (-54 -21 -18) (58 -27 191)))
                        (MULTIPLE-VALUE-LIST
Liam Healy's avatar
Liam Healy committed
70 71 72 73 74 75 76 77 78 79 80
                         (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)))))
81 82 83
                       (LISP-UNIT::ASSERT-NUMERICAL-EQUAL
                        (LIST #2A((95 54 208) (144 341 357) (197 324 320)))
                        (MULTIPLE-VALUE-LIST
Liam Healy's avatar
Liam Healy committed
84 85 86 87 88 89 90 91 92 93 94
                         (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)))))
95 96 97
                       (LISP-UNIT::ASSERT-NUMERICAL-EQUAL
                        (LIST #2A((-32 -40 101) (-54 -21 -18) (58 -27 191)))
                        (MULTIPLE-VALUE-LIST
Liam Healy's avatar
Liam Healy committed
98 99 100 101 102 103 104 105 106 107 108
                         (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)))))
109 110 111
                       (LISP-UNIT::ASSERT-NUMERICAL-EQUAL
                        (LIST #2A((95 54 208) (144 341 357) (197 324 320)))
                        (MULTIPLE-VALUE-LIST
Liam Healy's avatar
Liam Healy committed
112 113 114 115 116 117 118 119 120 121 122
                         (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)))))
123
		       #+int64
124 125 126
                       (LISP-UNIT::ASSERT-NUMERICAL-EQUAL
                        (LIST #2A((-32 -40 101) (-54 -21 -18) (58 -27 191)))
                        (MULTIPLE-VALUE-LIST
Liam Healy's avatar
Liam Healy committed
127 128 129 130 131 132 133 134 135 136 137
                         (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)))))
138
		       #+int64
139 140 141
                       (LISP-UNIT::ASSERT-NUMERICAL-EQUAL
                        (LIST #2A((95 54 208) (144 341 357) (197 324 320)))
                        (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 '(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))))))
153