bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#41223: 28.0.50; Calc gives wrong determinant for some matrices with


From: Mauro Aranda
Subject: bug#41223: 28.0.50; Calc gives wrong determinant for some matrices with symbolic variables
Date: Wed, 13 May 2020 19:15:48 -0300

Mattias Engdegård <mattiase@acm.org> writes:

Hello Mattias.

> Thank you for reporting this. If Calc cannot compute something, at least it shouldn't lie.

Agreed.  And thank you for taking care of this so quickly.

> In this case I'm tempted to apply the expedient below. Would that suffice for you?
>
> --- a/lisp/calc/calc-mtx.el
> +++ b/lisp/calc/calc-mtx.el
> @@ -275,7 +275,7 @@ math-do-matrix-lud
>                 k (1+ k)))
>         (setcar (nthcdr j (nth i lu)) sum)
>         (let ((dum (math-lud-pivot-check sum)))
> -         (if (Math-lessp big dum)
> +         (if (or (math-zerop big) (Math-lessp big dum))
>               (setq big dum
>                     imax i)))
>         (setq i (1+ i)))

It is good enough for me.  Thanks.

Best regards,
Mauro.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]