changeset 25268:592a4258b237

logspace.m: Update BIST tests to pass after cset ca022a8c4015. * logspace.m: Use complex() function to create complex numbers with Inf parts.
author Rik <rik@octave.org>
date Mon, 16 Apr 2018 14:59:43 -0700
parents 308a272bbe3c
children cac96fd5310d
files scripts/general/logspace.m
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/general/logspace.m	Mon Apr 16 14:39:33 2018 -0700
+++ b/scripts/general/logspace.m	Mon Apr 16 14:59:43 2018 -0700
@@ -100,8 +100,8 @@
 %!assert (logspace (Inf, Inf, 3), [Inf, Inf, Inf])
 %!assert (logspace (-Inf, -Inf, 3), [0, 0, 0])
 %!assert (logspace (-Inf, Inf, 3), [0, NaN, Inf])
-%!assert (logspace (Inf + 1i, Inf + 1i, 3), [-Inf + Inf * 1i, -Inf + Inf * 1i, -Inf + Inf * 1i])
-%!assert (logspace (-Inf + 1i, Inf + 1i, 3), [0, NaN + NaN * 1i, -Inf + Inf * 1i])
+%!assert (logspace (Inf + 1i, Inf + 1i, 3), repmat (complex (-Inf,Inf), [1, 3]))
+%!assert (logspace (-Inf + 1i, Inf + 1i, 3), [0, NaN + NaN * 1i, complex(-Inf, Inf)])
 %!assert (logspace (0, Inf, 3), [1, Inf, Inf])
 %!assert (logspace (0, -Inf, 3), [1, 0, 0])
 %!assert (logspace (-Inf, 0, 3), [0, NaN, 1])