Commit 00af1f83 authored by Liam Healy's avatar Liam Healy
Browse files

Complex arrays must be initialized with complex numbers

In the tests, complex arrays were initialized with reals (giving real,
imaginary in sequence), but that is no longer permitted, so these were
converted into complex.
parent 75d17ffe
......@@ -88,12 +88,6 @@ complex conjugate scalar product</a> of two complex vectors of length 3:
#2m(#c(49.27d0 -13.49d0) #c(32.5d0 42.73d0) #c(-17.24d0 43.31d0)))
#C(-2940.2118d0 1861.9380999999998d0)
</pre>
<p>or equivalently the vector arguments may be specified with reals,
<pre>
(cdot #2m(-34.5d0 8.24d0 3.29d0 -8.93d0 34.12d0 -6.15d0)
#2m(49.27d0 -13.49d0 32.5d0 42.73d0 -17.24d0 43.31d0))
#C(-2940.2118d0 1861.9380999999998d0)
</pre>
<p>There are over 1500 examples available from within GSLL with the
function <code>examples</code>. There is also a suite of over
4000 tests; many of the examples also serve as tests, and most others
......@@ -472,7 +466,7 @@ and arrays used internally or for function return.
<!-- Created: Feb 25 2005 -->
<!-- hhmts start -->
<small>
Time-stamp: <2010-06-30 19:57:28EDT index.html>
Time-stamp: <2010-06-30 21:18:34EDT index.html>
</small>
<!-- hhmts end -->
</div>
......
;; Regression test ABSOLUTE-SUM for GSLL, automatically generated
;;
;; Copyright 2009 Liam M. Healy
;; Copyright 2009, 2010 Liam M. Healy
;; Distributed under the terms of the GNU General Public License
;;
;; This program is free software: you can redistribute it and/or modify
......@@ -19,68 +19,40 @@
(in-package :gsl)
(LISP-UNIT:DEFINE-TEST ABSOLUTE-SUM
(LISP-UNIT::ASSERT-NUMERICAL-EQUAL (LIST 157.99)
(MULTIPLE-VALUE-LIST
(LET ((V1
(GRID:MAKE-FOREIGN-ARRAY
'SINGLE-FLOAT
:INITIAL-CONTENTS
'(-34.5 8.24
3.29 -8.93
34.12
-6.15
49.27
-13.49))))
(ABSOLUTE-SUM
V1))))
(LISP-UNIT::ASSERT-NUMERICAL-EQUAL (LIST 157.99d0)
(MULTIPLE-VALUE-LIST
(LET ((V1
(GRID:MAKE-FOREIGN-ARRAY
'DOUBLE-FLOAT
:INITIAL-CONTENTS
'(-34.5d0
8.24d0
3.29d0
-8.93d0
34.12d0
-6.15d0
49.27d0
-13.49d0))))
(ABSOLUTE-SUM
V1))))
(LISP-UNIT::ASSERT-NUMERICAL-EQUAL (LIST 388.65997)
(MULTIPLE-VALUE-LIST
(LET ((V1
(GRID:MAKE-FOREIGN-ARRAY
'(COMPLEX
SINGLE-FLOAT)
:INITIAL-CONTENTS
'(-34.5 8.24
3.29 -8.93
34.12
-6.15
49.27
-13.49
32.5 42.73
-17.24
43.31
-16.12
-8.25
21.44
-49.08))))
(ABSOLUTE-SUM
V1))))
(LISP-UNIT::ASSERT-NUMERICAL-EQUAL
(LIST 388.65999999999997d0)
(MULTIPLE-VALUE-LIST
(LET ((V1
(GRID:MAKE-FOREIGN-ARRAY '(COMPLEX DOUBLE-FLOAT)
:INITIAL-CONTENTS
'(-34.5d0 8.24d0 3.29d0 -8.93d0
34.12d0 -6.15d0 49.27d0 -13.49d0
32.5d0 42.73d0 -17.24d0 43.31d0
-16.12d0 -8.25d0 21.44d0
-49.08d0))))
(ABSOLUTE-SUM V1)))))
(LISP-UNIT::ASSERT-NUMERICAL-EQUAL
(LIST 157.99)
(MULTIPLE-VALUE-LIST
(LET ((V1
(GRID:MAKE-FOREIGN-ARRAY
'SINGLE-FLOAT
:INITIAL-CONTENTS
'(-34.5 8.24 3.29 -8.93 34.12 -6.15 49.27 -13.49))))
(ABSOLUTE-SUM V1))))
(LISP-UNIT::ASSERT-NUMERICAL-EQUAL
(LIST 157.99d0)
(MULTIPLE-VALUE-LIST
(LET ((V1
(GRID:MAKE-FOREIGN-ARRAY
'DOUBLE-FLOAT
:INITIAL-CONTENTS
'(-34.5d0 8.24d0 3.29d0 -8.93d0 34.12d0 -6.15d0 49.27d0 -13.49d0))))
(ABSOLUTE-SUM V1))))
(LISP-UNIT::ASSERT-NUMERICAL-EQUAL
(LIST 388.65997)
(MULTIPLE-VALUE-LIST
(LET ((V1
(GRID:MAKE-FOREIGN-ARRAY
'(COMPLEX
SINGLE-FLOAT)
:INITIAL-CONTENTS
'(#C(-34.5 8.24) #C(3.29 -8.93) #C(34.12 -6.15) #C(49.27 -13.49)
#C(32.5 42.73) #C(-17.24 43.31) #C(-16.12 -8.25) #C(21.44 -49.08)))))
(ABSOLUTE-SUM V1))))
(LISP-UNIT::ASSERT-NUMERICAL-EQUAL
(LIST 388.65999999999997d0)
(MULTIPLE-VALUE-LIST
(LET ((V1
#2m(#C(-34.5d0 8.24d0) #C(3.29d0 -8.93d0) #C(34.12d0 -6.15d0)
#C(49.27d0 -13.49d0) #C(32.5d0 42.73d0) #C(-17.24d0 43.31d0)
#C(-16.12d0 -8.25d0) #C(21.44d0 -49.08d0))))
(ABSOLUTE-SUM V1)))))
......@@ -19,91 +19,95 @@
(in-package :gsl)
(LISP-UNIT:DEFINE-TEST AXPY
(LISP-UNIT::ASSERT-NUMERICAL-EQUAL
(LIST
#(1400.77 -284.0684 -147.7214 397.47382 -1369.3191
235.659 -1932.6083 485.93335))
(MULTIPLE-VALUE-LIST
(LET ((V1
(GRID:MAKE-FOREIGN-ARRAY 'SINGLE-FLOAT :INITIAL-CONTENTS
'(-34.5 8.24 3.29 -8.93 34.12
-6.15 49.27 -13.49)))
(V2
(GRID:MAKE-FOREIGN-ARRAY 'SINGLE-FLOAT :INITIAL-CONTENTS
'(32.5 42.73 -17.24 43.31 -16.12
-8.25 21.44 -49.08)))
(SCALAR -39.66))
(CL-ARRAY (AXPY SCALAR V1 V2)))))
(LISP-UNIT::ASSERT-NUMERICAL-EQUAL
(LIST
#(1400.77d0 -284.06839999999994d0 -147.7214d0
397.4738d0 -1369.3191999999997d0 235.659d0
-1932.6082d0 485.93339999999995d0))
(MULTIPLE-VALUE-LIST
(LET ((V1
(GRID:MAKE-FOREIGN-ARRAY 'DOUBLE-FLOAT :INITIAL-CONTENTS
'(-34.5d0 8.24d0 3.29d0 -8.93d0
34.12d0 -6.15d0 49.27d0
-13.49d0)))
(V2
(GRID:MAKE-FOREIGN-ARRAY 'DOUBLE-FLOAT :INITIAL-CONTENTS
'(32.5d0 42.73d0 -17.24d0 43.31d0
-16.12d0 -8.25d0 21.44d0
-49.08d0)))
(SCALAR -39.66d0))
(CL-ARRAY (AXPY SCALAR V1 V2)))))
#+fsbv
(LISP-UNIT::ASSERT-NUMERICAL-EQUAL
(LIST
#(#C(1808.3204 1422.3015) #C(-589.3992 234.75043)
#C(-1673.498 -1451.916) #C(-2599.8237 -1950.9608)
#C(784.81586 -3351.5815) #C(2845.531 -870.5343)
#C(222.45422 1149.8602) #C(-3308.3872 917.76044)))
(MULTIPLE-VALUE-LIST
(LET ((V1
(GRID:MAKE-FOREIGN-ARRAY '(COMPLEX SINGLE-FLOAT)
:INITIAL-CONTENTS
'(-34.5 8.24 3.29 -8.93 34.12
-6.15 49.27 -13.49 32.5 42.73
-17.24 43.31 -16.12 -8.25 21.44
-49.08)))
(V2
(GRID:MAKE-FOREIGN-ARRAY '(COMPLEX SINGLE-FLOAT)
:INITIAL-CONTENTS
'(32.5 42.73 -17.24 43.31 -16.12
-8.25 21.44 -49.08 -39.66 -49.46
19.68 -5.55 -8.82 25.37 -30.58
31.67)))
(SCALAR #C(-39.66 -49.46)))
(CL-ARRAY (AXPY SCALAR V1 V2)))))
#+fsbv
(LISP-UNIT::ASSERT-NUMERICAL-EQUAL
(LIST
#(#C(1808.3204d0 1422.3016000000002d0)
#C(-589.3992d0 234.75039999999998d0)
#C(-1673.4981999999998d0 -1451.9162000000001d0)
#C(-2599.8236d0 -1950.9608000000003d0)
#C(784.8158000000002d0 -3351.5818d0)
#C(2845.5309999999995d0 -870.5342d0)
#C(222.45420000000001d0 1149.8601999999998d0)
#C(-3308.3871999999997d0 917.7603999999995d0)))
(MULTIPLE-VALUE-LIST
(LET ((V1
(GRID:MAKE-FOREIGN-ARRAY '(COMPLEX DOUBLE-FLOAT)
:INITIAL-CONTENTS
'(-34.5d0 8.24d0 3.29d0 -8.93d0
34.12d0 -6.15d0 49.27d0 -13.49d0
32.5d0 42.73d0 -17.24d0 43.31d0
-16.12d0 -8.25d0 21.44d0
-49.08d0)))
(V2
(GRID:MAKE-FOREIGN-ARRAY '(COMPLEX DOUBLE-FLOAT)
:INITIAL-CONTENTS
'(32.5d0 42.73d0 -17.24d0 43.31d0
-16.12d0 -8.25d0 21.44d0
-49.08d0 -39.66d0 -49.46d0
19.68d0 -5.55d0 -8.82d0 25.37d0
-30.58d0 31.67d0)))
(SCALAR #C(-39.66d0 -49.46d0)))
(CL-ARRAY (AXPY SCALAR V1 V2))))))
(LISP-UNIT::ASSERT-NUMERICAL-EQUAL
(LIST
#(1400.77 -284.0684 -147.7214 397.47382 -1369.3191
235.659 -1932.6083 485.93335))
(MULTIPLE-VALUE-LIST
(LET ((V1
(GRID:MAKE-FOREIGN-ARRAY
'SINGLE-FLOAT :INITIAL-CONTENTS
'(-34.5 8.24 3.29 -8.93 34.12 -6.15 49.27 -13.49)))
(V2
(GRID:MAKE-FOREIGN-ARRAY
'SINGLE-FLOAT :INITIAL-CONTENTS
'(32.5 42.73 -17.24 43.31 -16.12 -8.25 21.44 -49.08)))
(SCALAR -39.66))
(CL-ARRAY (AXPY SCALAR V1 V2)))))
(LISP-UNIT::ASSERT-NUMERICAL-EQUAL
(LIST
#(1400.77d0 -284.06839999999994d0 -147.7214d0
397.4738d0 -1369.3191999999997d0 235.659d0
-1932.6082d0 485.93339999999995d0))
(MULTIPLE-VALUE-LIST
(LET ((V1
(GRID:MAKE-FOREIGN-ARRAY
'DOUBLE-FLOAT
:INITIAL-CONTENTS
'(-34.5d0 8.24d0 3.29d0 -8.93d0
34.12d0 -6.15d0 49.27d0
-13.49d0)))
(V2
(GRID:MAKE-FOREIGN-ARRAY
'DOUBLE-FLOAT
:INITIAL-CONTENTS
'(32.5d0 42.73d0 -17.24d0 43.31d0
-16.12d0 -8.25d0 21.44d0
-49.08d0)))
(SCALAR -39.66d0))
(CL-ARRAY (AXPY SCALAR V1 V2)))))
#+fsbv
(LISP-UNIT::ASSERT-NUMERICAL-EQUAL
(LIST
#(#C(1808.3204 1422.3015) #C(-589.3992 234.75043)
#C(-1673.498 -1451.916) #C(-2599.8237 -1950.9608)
#C(784.81586 -3351.5815) #C(2845.531 -870.5343)
#C(222.45422 1149.8602) #C(-3308.3872 917.76044)))
(MULTIPLE-VALUE-LIST
(LET ((V1
(GRID:MAKE-FOREIGN-ARRAY
'(COMPLEX SINGLE-FLOAT)
:INITIAL-CONTENTS
'(#C(-34.5 8.24) #C(3.29 -8.93)
#C(34.12 -6.15) #C(49.27 -13.49) #C(32.5 42.73)
#C(-17.24 43.31) #C(-16.12 -8.25) #C(21.44 -49.08))))
(V2
(GRID:MAKE-FOREIGN-ARRAY
'(COMPLEX SINGLE-FLOAT)
:INITIAL-CONTENTS
'(#C(32.5 42.73) #C(-17.24 43.31) #C(-16.12 -8.25)
#C(21.44 -49.08) #C(-39.66 -49.46)
#C(19.68 -5.55) #C(-8.82 25.37)
#C(-30.58 31.67))))
(SCALAR #C(-39.66 -49.46)))
(CL-ARRAY (AXPY SCALAR V1 V2)))))
#+fsbv
(LISP-UNIT::ASSERT-NUMERICAL-EQUAL
(LIST
#(#C(1808.3204d0 1422.3016000000002d0)
#C(-589.3992d0 234.75039999999998d0)
#C(-1673.4981999999998d0 -1451.9162000000001d0)
#C(-2599.8236d0 -1950.9608000000003d0)
#C(784.8158000000002d0 -3351.5818d0)
#C(2845.5309999999995d0 -870.5342d0)
#C(222.45420000000001d0 1149.8601999999998d0)
#C(-3308.3871999999997d0 917.7603999999995d0)))
(MULTIPLE-VALUE-LIST
(LET ((V1
(GRID:MAKE-FOREIGN-ARRAY
'(COMPLEX DOUBLE-FLOAT)
:INITIAL-CONTENTS
'(#C(-34.5d0 8.24d0) #C(3.29d0 -8.93d0)
#C(34.12d0 -6.15d0) #C(49.27d0 -13.49d0)
#C(32.5d0 42.73d0) #C(-17.24d0 43.31d0)
#C(-16.12d0 -8.25d0) #C(21.44d0 -49.08d0))))
(V2
(GRID:MAKE-FOREIGN-ARRAY
'(COMPLEX DOUBLE-FLOAT)
:INITIAL-CONTENTS
'(#C(32.5d0 42.73d0) #C(-17.24d0 43.31d0)
#C(-16.12d0 -8.25d0) #C(21.44d0 -49.08d0)
#C(-39.66d0 -49.46d0) #C(19.68d0 -5.55d0)
#C(-8.82d0 25.37d0) #C(-30.58d0 31.67d0))))
(SCALAR #C(-39.66d0 -49.46d0)))
(CL-ARRAY (AXPY SCALAR V1 V2))))))
;; Regression test BLAS-COPY for GSLL, automatically generated
;;
;; Copyright 2009 Liam M. Healy
;; Copyright 2009, 2010 Liam M. Healy
;; Distributed under the terms of the GNU General Public License
;;
;; This program is free software: you can redistribute it and/or modify
......@@ -19,50 +19,50 @@
(in-package :gsl)
(LISP-UNIT:DEFINE-TEST BLAS-COPY
(LISP-UNIT::ASSERT-NUMERICAL-EQUAL
(LIST #(-34.5 8.24 3.29))
(MULTIPLE-VALUE-LIST
(LET ((V1
(GRID:MAKE-FOREIGN-ARRAY 'SINGLE-FLOAT :INITIAL-CONTENTS
'(-34.5 8.24 3.29)))
(V2 (GRID:MAKE-FOREIGN-ARRAY 'SINGLE-FLOAT :DIMENSIONS '3)))
(BLAS-COPY V1 V2)
(CL-ARRAY V2))))
(LISP-UNIT::ASSERT-NUMERICAL-EQUAL
(LIST #(-34.5d0 8.24d0 3.29d0))
(MULTIPLE-VALUE-LIST
(LET ((V1
(GRID:MAKE-FOREIGN-ARRAY 'DOUBLE-FLOAT :INITIAL-CONTENTS
'(-34.5d0 8.24d0 3.29d0)))
(V2 (GRID:MAKE-FOREIGN-ARRAY 'DOUBLE-FLOAT :DIMENSIONS '3)))
(BLAS-COPY V1 V2)
(CL-ARRAY V2))))
(LISP-UNIT::ASSERT-NUMERICAL-EQUAL
(LIST #(#C(-34.5 8.24) #C(3.29 -8.93) #C(34.12 -6.15)))
(MULTIPLE-VALUE-LIST
(LET ((V1
(GRID:MAKE-FOREIGN-ARRAY '(COMPLEX SINGLE-FLOAT)
:INITIAL-CONTENTS
'(-34.5 8.24 3.29 -8.93 34.12
-6.15)))
(V2
(GRID:MAKE-FOREIGN-ARRAY '(COMPLEX SINGLE-FLOAT)
:DIMENSIONS '3)))
(BLAS-COPY V1 V2)
(CL-ARRAY V2))))
(LISP-UNIT::ASSERT-NUMERICAL-EQUAL
(LIST
#(#C(-34.5d0 8.24d0) #C(3.29d0 -8.93d0)
#C(34.12d0 -6.15d0)))
(MULTIPLE-VALUE-LIST
(LET ((V1
(GRID:MAKE-FOREIGN-ARRAY '(COMPLEX DOUBLE-FLOAT)
:INITIAL-CONTENTS
'(-34.5d0 8.24d0 3.29d0 -8.93d0
34.12d0 -6.15d0)))
(V2
(GRID:MAKE-FOREIGN-ARRAY '(COMPLEX DOUBLE-FLOAT)
:DIMENSIONS '3)))
(BLAS-COPY V1 V2)
(CL-ARRAY V2)))))
(LISP-UNIT::ASSERT-NUMERICAL-EQUAL
(LIST #(-34.5 8.24 3.29))
(MULTIPLE-VALUE-LIST
(LET ((V1
(GRID:MAKE-FOREIGN-ARRAY
'SINGLE-FLOAT :INITIAL-CONTENTS '(-34.5 8.24 3.29)))
(V2 (GRID:MAKE-FOREIGN-ARRAY 'SINGLE-FLOAT :DIMENSIONS '3)))
(BLAS-COPY V1 V2)
(CL-ARRAY V2))))
(LISP-UNIT::ASSERT-NUMERICAL-EQUAL
(LIST #(-34.5d0 8.24d0 3.29d0))
(MULTIPLE-VALUE-LIST
(LET ((V1
(GRID:MAKE-FOREIGN-ARRAY
'DOUBLE-FLOAT :INITIAL-CONTENTS '(-34.5d0 8.24d0 3.29d0)))
(V2 (GRID:MAKE-FOREIGN-ARRAY 'DOUBLE-FLOAT :DIMENSIONS '3)))
(BLAS-COPY V1 V2)
(CL-ARRAY V2))))
(LISP-UNIT::ASSERT-NUMERICAL-EQUAL
(LIST #(#C(-34.5 8.24) #C(3.29 -8.93) #C(34.12 -6.15)))
(MULTIPLE-VALUE-LIST
(LET ((V1
(GRID:MAKE-FOREIGN-ARRAY
'(COMPLEX SINGLE-FLOAT)
:INITIAL-CONTENTS
'(#C(-34.5 8.24) #C(3.29 -8.93) #C(34.12 -6.15))))
(V2
(GRID:MAKE-FOREIGN-ARRAY
'(COMPLEX SINGLE-FLOAT) :DIMENSIONS '3)))
(BLAS-COPY V1 V2)
(CL-ARRAY V2))))
(LISP-UNIT::ASSERT-NUMERICAL-EQUAL
(LIST
#(#C(-34.5d0 8.24d0) #C(3.29d0 -8.93d0)
#C(34.12d0 -6.15d0)))
(MULTIPLE-VALUE-LIST
(LET ((V1
(GRID:MAKE-FOREIGN-ARRAY
'(COMPLEX DOUBLE-FLOAT)
:INITIAL-CONTENTS
'(#C(-34.5d0 8.24d0) #C(3.29d0 -8.93d0)
#C(34.12d0 -6.15d0))))
(V2
(GRID:MAKE-FOREIGN-ARRAY
'(COMPLEX DOUBLE-FLOAT) :DIMENSIONS '3)))
(BLAS-COPY V1 V2)
(CL-ARRAY V2)))))
;; Regression test BLAS-SWAP for GSLL, automatically generated
;;
;; Copyright 2009 Liam M. Healy
;; Copyright 2009, 2010 Liam M. Healy
;; Distributed under the terms of the GNU General Public License
;;
;; This program is free software: you can redistribute it and/or modify
......@@ -19,66 +19,69 @@
(in-package :gsl)
(LISP-UNIT:DEFINE-TEST BLAS-SWAP
(LISP-UNIT::ASSERT-NUMERICAL-EQUAL
(LIST (LIST #(-8.93 34.12 -6.15) #(-34.5 8.24 3.29)))
(MULTIPLE-VALUE-LIST
(LET ((V1
(GRID:MAKE-FOREIGN-ARRAY 'SINGLE-FLOAT :INITIAL-CONTENTS
'(-34.5 8.24 3.29)))
(V2
(GRID:MAKE-FOREIGN-ARRAY 'SINGLE-FLOAT :INITIAL-CONTENTS
'(-8.93 34.12 -6.15))))
(BLAS-SWAP V2 V1)
(LIST (CL-ARRAY V1) (CL-ARRAY V2)))))
(LISP-UNIT::ASSERT-NUMERICAL-EQUAL
(LIST
(LIST #(-8.93d0 34.12d0 -6.15d0)
#(-34.5d0 8.24d0 3.29d0)))
(MULTIPLE-VALUE-LIST
(LET ((V1
(GRID:MAKE-FOREIGN-ARRAY 'DOUBLE-FLOAT :INITIAL-CONTENTS
'(-34.5d0 8.24d0 3.29d0)))
(V2
(GRID:MAKE-FOREIGN-ARRAY 'DOUBLE-FLOAT :INITIAL-CONTENTS
'(-8.93d0 34.12d0 -6.15d0))))
(BLAS-SWAP V2 V1)
(LIST (CL-ARRAY V1) (CL-ARRAY V2)))))
(LISP-UNIT::ASSERT-NUMERICAL-EQUAL
(LIST
(LIST
#(#C(-8.93 34.12) #C(-6.15 49.27) #C(-13.49 32.5))
#(#C(-34.5 8.24) #C(3.29 -8.93) #C(34.12 -6.15))))
(MULTIPLE-VALUE-LIST
(LET ((V1
(GRID:MAKE-FOREIGN-ARRAY '(COMPLEX SINGLE-FLOAT)
:INITIAL-CONTENTS
'(-34.5 8.24 3.29 -8.93 34.12
-6.15)))
(V2
(GRID:MAKE-FOREIGN-ARRAY '(COMPLEX SINGLE-FLOAT)
:INITIAL-CONTENTS
'(-8.93 34.12 -6.15 49.27 -13.49
32.5))))
(BLAS-SWAP V2 V1)
(LIST (CL-ARRAY V1) (CL-ARRAY V2)))))
(LISP-UNIT::ASSERT-NUMERICAL-EQUAL
(LIST
(LIST
#(#C(-8.93d0 34.12d0) #C(-6.15d0 49.27d0)
#C(-13.49d0 32.5d0))
#(#C(-34.5d0 8.24d0) #C(3.29d0 -8.93d0)
#C(34.12d0 -6.15d0))))
(MULTIPLE-VALUE-LIST
(LET ((V1
(GRID:MAKE-FOREIGN-ARRAY '(COMPLEX DOUBLE-FLOAT)
:INITIAL-CONTENTS
'(-34.5d0 8.24d0 3.29d0 -8.93d0
34.12d0 -6.15d0)))
(V2
(GRID:MAKE-FOREIGN-ARRAY '(COMPLEX DOUBLE-FLOAT)
:INITIAL-CONTENTS
'(-8.93d0 34.12d0 -6.15d0 49.27d0
-13.49d0 32.5d0))))
(BLAS-SWAP V2 V1)
(LIST (CL-ARRAY V1) (CL-ARRAY V2))))))
(LISP-UNIT::ASSERT-NUMERICAL-EQUAL
(LIST (LIST #(-8.93 34.12 -6.15) #(-34.5 8.24 3.29)))
(MULTIPLE-VALUE-LIST
(LET ((V1
(GRID:MAKE-FOREIGN-ARRAY
'SINGLE-FLOAT :INITIAL-CONTENTS
'(-34.5 8.24 3.29)))
(V2
(GRID:MAKE-FOREIGN-ARRAY
'SINGLE-FLOAT :INITIAL-CONTENTS
'(-8.93 34.12 -6.15))))
(BLAS-SWAP V2 V1)
(LIST (CL-ARRAY V1) (CL-ARRAY V2)))))
(LISP-UNIT::ASSERT-NUMERICAL-EQUAL
(LIST
(LIST #(-8.93d0 34.12d0 -6.15d0)
#(-34.5d0 8.24d0 3.29d0)))
(MULTIPLE-VALUE-LIST
(LET ((V1
(GRID:MAKE-FOREIGN-ARRAY
'DOUBLE-FLOAT :INITIAL-CONTENTS
'(-34.5d0 8.24d0 3.29d0)))
(V2
(GRID:MAKE-FOREIGN-ARRAY
'DOUBLE-FLOAT :INITIAL-CONTENTS
'(-8.93d0 34.12d0 -6.15d0))))
(BLAS-SWAP V2 V1)
(LIST (CL-ARRAY V1) (CL-ARRAY V2)))))
(LISP-UNIT::ASSERT-NUMERICAL-EQUAL
(LIST
(LIST
#(#C(-8.93 34.12) #C(-6.15 49.27) #C(-13.49 32.5))
#(#C(-34.5 8.24) #C(3.29 -8.93) #C(34.12 -6.15))))
(MULTIPLE-VALUE-LIST
(LET ((V1
(GRID:MAKE-FOREIGN-ARRAY
'(COMPLEX SINGLE-FLOAT)
:INITIAL-CONTENTS
'(#C(-34.5 8.24) #C(3.29 -8.93) #C(34.12 -6.15))))
(V2
(GRID:MAKE-FOREIGN-ARRAY
'(COMPLEX SINGLE-FLOAT)
:INITIAL-CONTENTS
'(#C(-8.93 34.12) #C(-6.15 49.27) #C(-13.49 32.5)))))
(BLAS-SWAP V2 V1)
(LIST (CL-ARRAY V1) (CL-ARRAY V2)))))
(LISP-UNIT::ASSERT-NUMERICAL-EQUAL
(LIST
(LIST
#(#C(-8.93d0 34.12d0) #C(-6.15d0 49.27d0)
#C(-13.49d0 32.5d0))
#(#C(-34.5d0 8.24d0) #C(3.29d0 -8.93d0)
#C(34.12d0 -6.15d0))))
(MULTIPLE-VALUE-LIST
(LET ((V1
(GRID:MAKE-FOREIGN-ARRAY
'(COMPLEX DOUBLE-FLOAT)
:INITIAL-CONTENTS
'(#C(-34.5d0 8.24d0) #C(3.29d0 -8.93d0) #C(34.12d0 -6.15d0))))
(V2
(GRID:MAKE-FOREIGN-ARRAY
'(COMPLEX DOUBLE-FLOAT)
:INITIAL-CONTENTS
'(#C(-8.93d0 34.12d0) #C(-6.15d0 49.27d0) #C(-13.49d0 32.5d0)))))
(BLAS-SWAP V2 V1)
(LIST (CL-ARRAY V1) (CL-ARRAY V2))))))
;; Regression test CDOT for GSLL, automatically generated
;;
;; Copyright 2009 Liam M. Healy
;; Copyright 2009, 2010 Liam M. Healy
;; Distributed under the terms of the GNU General Public License
;;
;; This program is free software: you can redistribute it and/or modify
......@@ -19,42 +19,43 @@
(in-package :gsl)
(LISP-UNIT:DEFINE-TEST CDOT
(LISP-UNIT::ASSERT-NUMERICAL-EQUAL
(LIST #C(-1.1684039224427728d28 0.0d0))
(MULTIPLE-VALUE-LIST
(LET ((V1
(GRID:MAKE-FOREIGN-ARRAY '(COMPLEX SINGLE-FLOAT)
:INITIAL-CONTENTS
'(-34.5 8.24 3.29 -8.93 34.12
-6.15 49.27 -13.49 32.5 42.73
-17.24 43.31 -16.12 -8.25 21.44
-49.08)))
(V2
(GRID:MAKE-FOREIGN-ARRAY '(COMPLEX SINGLE-FLOAT)
:INITIAL-CONTENTS
'(32.5 42.73 -17.24 43.31 -16.12
-8.25 21.44 -49.08 -39.66 -49.46
19.68 -5.55 -8.82 25.37 -30.58
31.67))))
(CDOT V1 V2))))
(LISP-UNIT::ASSERT-NUMERICAL-EQUAL
(LIST #C(-6252.624d0 -6236.050300000001d0))
(MULTIPLE-VALUE-LIST
(LET ((V1
(GRID:MAKE-FOREIGN-ARRAY '(COMPLEX DOUBLE-FLOAT)
:INITIAL-CONTENTS
'(-34.5d0 8.24d0 3.29d0 -8.93d0
34.12d0 -6.15d0 49.27d0 -13.49d0
32.5d0 42.73d0 -17.24d0 43.31d0
-16.12d0 -8.25d0 21.44d0