From cf5610a557375c57efeceba85df2c1c6b5669d3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5kon=20H=C3=A6gland?= Date: Tue, 9 Jul 2024 20:42:23 +0200 Subject: [PATCH] Make the matrix singular --- t/Linalg.t | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/t/Linalg.t b/t/Linalg.t index 7cfcc88..272b87a 100644 --- a/t/Linalg.t +++ b/t/Linalg.t @@ -44,7 +44,10 @@ sub GSL_LINALG_LU_DECOMP : Tests { $base->set_row(0, [0,1,2,3]) ->set_row(1, [5,6,7,8]) ->set_row(2, [9,10,11,12]) - ->set_row(3, [13,14,15,16]); + # NOTE: Using [13,14,15,16] here causes a singular matrix but due to + # rounding errors it is not recognized as such on some platforms, + # so we will instead repeat the third row to make it singular in a more obvious way + ->set_row(3, [9,10,11,12]); my $permutation = gsl_permutation_alloc(4); gsl_permutation_init($permutation); my $first = Math::GSL::Matrix->new(4,4);