From: "Mattias Engdegård" <mattiase@acm.org>
To: Mauro Aranda <maurooaranda@gmail.com>
Cc: 41223@debbugs.gnu.org
Subject: bug#41223: 28.0.50; Calc gives wrong determinant for some matrices with symbolic variables
Date: Wed, 13 May 2020 14:58:33 +0200 [thread overview]
Message-ID: <FFA84787-DD97-48D9-B20E-D7E9407A0764@acm.org> (raw)
In-Reply-To: <CABczVwd1WCxum_URtS7=hpV40FsuTGoBjqC+u53-vSfFzfq2Mg@mail.gmail.com>
Thank you for reporting this. If Calc cannot compute something, at least it shouldn't lie.
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)))
next prev parent reply other threads:[~2020-05-13 12:58 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-12 23:24 bug#41223: 28.0.50; Calc gives wrong determinant for some matrices with symbolic variables Mauro Aranda
2020-05-13 12:58 ` Mattias Engdegård [this message]
2020-05-13 22:15 ` Mauro Aranda
2020-05-14 8:43 ` Mattias Engdegård
2020-05-14 9:56 ` Mattias Engdegård
2020-05-14 11:49 ` Mauro Aranda
2020-05-14 11:41 ` Mauro Aranda
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=FFA84787-DD97-48D9-B20E-D7E9407A0764@acm.org \
--to=mattiase@acm.org \
--cc=41223@debbugs.gnu.org \
--cc=maurooaranda@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).