From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Newsgroups: gmane.emacs.bugs Subject: bug#58929: 29.0.50; Calc: finding roots utpn doesn't work as advertised Date: Tue, 1 Nov 2022 17:51:11 +0100 Message-ID: <8773828B-3A5F-4B15-8786-91F6FCB6D2E2@acm.org> References: <87fsf3uanl.fsf@rfc20.org> Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.13\)) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6211"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 58929@debbugs.gnu.org To: Matt Armstrong Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Nov 01 18:04:58 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1opuh8-0001LR-2s for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 01 Nov 2022 18:04:58 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1opuUd-0000Xd-G6; Tue, 01 Nov 2022 12:52:03 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1opuUc-0000XH-2y for bug-gnu-emacs@gnu.org; Tue, 01 Nov 2022 12:52:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1opuUb-0002bz-Rf for bug-gnu-emacs@gnu.org; Tue, 01 Nov 2022 12:52:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1opuUb-0001I2-Ng for bug-gnu-emacs@gnu.org; Tue, 01 Nov 2022 12:52:01 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: <87fsf3uanl.fsf@rfc20.org> Resent-From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 01 Nov 2022 16:52:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58929 X-GNU-PR-Package: emacs Original-Received: via spool by 58929-submit@debbugs.gnu.org id=B58929.16673214824908 (code B ref 58929); Tue, 01 Nov 2022 16:52:01 +0000 Original-Received: (at 58929) by debbugs.gnu.org; 1 Nov 2022 16:51:22 +0000 Original-Received: from localhost ([127.0.0.1]:44097 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1opuTx-0001H6-Qp for submit@debbugs.gnu.org; Tue, 01 Nov 2022 12:51:22 -0400 Original-Received: from mail33c50.megamailservers.eu ([91.136.10.43]:60832) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1opuTu-0001Gt-U2 for 58929@debbugs.gnu.org; Tue, 01 Nov 2022 12:51:20 -0400 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1667321476; bh=fGninPJ7WSkzwK/Cx8D9Mgy2WcZhovqpwZGN0rc9suE=; h=From:Subject:Date:Cc:To:From; b=FochP5xN76hxSYcJ8i8zv7DSOt82sEzj8gbn5mjFy+vmOsp9tmmE70Ew7pwtjgbaz 5KZrOtn95BBotdRD70V4lBRLN3Q6uc09TRlVhUwi59d2orVELGly1Oo136ANtjiqY8 N17iCgZnWbFlK2FOeq451Dbyn83UeYTgw1VOS0M4= Feedback-ID: mattiase@acm.or Original-Received: from smtpclient.apple (c188-150-171-209.bredband.tele2.se [188.150.171.209]) (authenticated bits=0) by mail33c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id 2A1GpC91099113; Tue, 1 Nov 2022 16:51:15 +0000 X-Mailer: Apple Mail (2.3654.120.0.1.13) X-CTCH-RefID: str=0001.0A782F25.63614E84.003F, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-Origin-Country: SE X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: "bug-gnu-emacs" Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:246777 Archived-At: 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.