commit 60858697b199d089ef78451d51063743f9b6f6d1 parent e1e7a4b8e86087da79b86ba2ea394785346396db Author: Sebastiano Tronto <sebastiano@tronto.net> Date: Mon, 25 Dec 2023 09:19:09 +0100 Fixed a whoopsie Diffstat:
| M | 2023/24/24b.c | | | 4 | ++-- |
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/2023/24/24b.c b/2023/24/24b.c @@ -62,8 +62,8 @@ bool solvesystem(double A[D][D], double C[D], int d, double *X) { int imax; double maxi = 0.0; for (int j = i; j < d; j++) { - if (A[j][i] > maxi) { - maxi = A[j][i]; + if (ABS(A[j][i]) > maxi) { + maxi = ABS(A[j][i]); imax = j; } }