changeset 30443:3ab3feae06cb stable

sqrtm: Re-write test to check if the solution is correct (bug #60797). * libinterp/corefcn/sqrtm.cc: Re-write test with singular matrix to accept any valid solution returned by sqrtm. Mark test with bug number.
author Markus Mützel <markus.muetzel@gmx.de>
date Tue, 07 Dec 2021 08:52:19 +0100
parents f3bf43b11a73
children 33a53086c0fb 56eddda69c0e
files libinterp/corefcn/sqrtm.cc
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libinterp/corefcn/sqrtm.cc	Mon Dec 06 16:53:15 2021 +0100
+++ b/libinterp/corefcn/sqrtm.cc	Tue Dec 07 08:52:19 2021 +0100
@@ -262,7 +262,7 @@
 
 /*
 %!assert (sqrtm (2*ones (2)), ones (2), 3*eps)
-%!assert (real (sqrtm (ones (4))), 0.5*ones (4), 4*eps)
+%!assert <60797*> (sqrtm (ones (4))^2, ones (4), 4*eps)
 
 ## The following two tests are from the reference in the docstring above.
 %!test