From: "Mattias Engdegård" <mattiase@acm.org>
To: Matt Armstrong <matt@rfc20.org>
Cc: 58929@debbugs.gnu.org
Subject: bug#58929: 29.0.50; Calc: finding roots utpn doesn't work as advertised
Date: Tue, 1 Nov 2022 17:51:11 +0100 [thread overview]
Message-ID: <8773828B-3A5F-4B15-8786-91F6FCB6D2E2@acm.org> (raw)
In-Reply-To: <87fsf3uanl.fsf@rfc20.org>
Unfortunately straight Newton won't converge for this function (erf, essentially) if you stray too far from the origin (ie, the mean) so I suggest you always use that as a starting guess no matter what point you are trying to find the inverse for.
Another way is to use an interval as starting guess instead of a single point; that seems to make Calc switch tactics and persevere.
One thing that can happen is running out of stack, because many of the implementations like math-newton-root are recursive. This should be easy to remedy as they all seem to be tail calls.
Obviously the claim to guarantee a solution for "any initial guess" is fanciful.
next prev parent reply other threads:[~2022-11-01 16:51 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-31 18:10 bug#58929: 29.0.50; Calc: finding roots utpn doesn't work as advertised Matt Armstrong
2022-11-01 16:51 ` Mattias Engdegård [this message]
2022-11-01 22:00 ` Matt Armstrong
2022-11-03 8:53 ` Mattias Engdegård
2022-11-03 9:13 ` Eli Zaretskii
2022-11-05 19:29 ` Matt Armstrong
2022-11-08 11:00 ` Mattias Engdegård
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8773828B-3A5F-4B15-8786-91F6FCB6D2E2@acm.org \
--to=mattiase@acm.org \
--cc=58929@debbugs.gnu.org \
--cc=matt@rfc20.org \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.