Commit 1bc9e369 authored by pfdietz's avatar pfdietz

Additional complex tests.

parent 3d1c148a
......@@ -48,3 +48,14 @@
(eql (float 0 x) (realpart c))
(eql x (imagpart c))))
t)
;;; Tests of some properties of complex numbers
(deftest complex.5
(loop for c in *complexes*
unless (loop for type in '(short-float single-float double-float long-float)
always (if (typep (realpart c) type)
(typep (imagpart c) type)
(not (typep (imagpart c) type))))
collect c)
nil)
......@@ -126,7 +126,23 @@
#C(-1.0 -1.0)
#C(1289713.12312 -9.12681271)
#C(1.0D100 1.0D100)
#C(-1.0D-100 -1.0D-100)))
#C(-1.0D-100 -1.0D-100)
#C(10.0s0 20.0s0)
#C(100.0l0 200.0l0)
#C(1.0s0 2.0f0)
#C(1.0s0 3.0d0)
#C(1.0s0 4.0l0)
#C(1.0f0 5.0d0)
#C(1.0f0 6.0l0)
#C(1.0d0 7.0l0)
#C(1.0f0 2.0s0)
#C(1.0d0 3.0s0)
#C(1.0l0 4.0s0)
#C(1.0d0 5.0f0)
#C(1.0l0 6.0f0)
#C(1.0l0 7.0d0)
#C(1/2 1/3)
))
(defparameter *numbers*
(append *integers*
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment