From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Christopher Dimech Newsgroups: gmane.emacs.devel Subject: hypotenuse Date: Sun, 21 Jul 2024 18:17:02 +0200 Message-ID: References: <8734o9sdig.fsf@posteo.net> <87wmllqq66.fsf@posteo.net> <87plrdqnhc.fsf@posteo.net> <87le21qldj.fsf_-_@posteo.net> <878qy1at52.fsf@dataswamp.org> <87plr6u8al.fsf_-_@dataswamp.org> <86wmleby8w.fsf@gnu.org> <86sew2bxii.fsf@gnu.org> <86frs2bu76.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25931"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Max Nikulin , emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Jul 21 18:17:34 2024 Return-path: Envelope-to: ged-emacs-devel@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 1sVZFd-0006Rh-5q for ged-emacs-devel@m.gmane-mx.org; Sun, 21 Jul 2024 18:17:33 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sVZFJ-0005xa-BO; Sun, 21 Jul 2024 12:17:13 -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 1sVZFE-0005x9-PS for emacs-devel@gnu.org; Sun, 21 Jul 2024 12:17:09 -0400 Original-Received: from mout.gmx.net ([212.227.15.18]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sVZFC-0001UK-Q9; Sun, 21 Jul 2024 12:17:08 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.com; s=s31663417; t=1721578622; x=1722183422; i=dimech@gmx.com; bh=SjLqKdBof5Q5FyjfCcvDEE5tkTHsy+9JrrAtmBC0g3M=; h=X-UI-Sender-Class:MIME-Version:Message-ID:From:To:Cc:Subject: Content-Type:Date:In-Reply-To:References: Content-Transfer-Encoding:cc:content-transfer-encoding: content-type:date:from:message-id:mime-version:reply-to:subject: to; b=BrenBVdaiHq++VMksr2DRtfEIhj2OOKnINAqdwU+othijmDpt9BSjjKsnbYLCt0M 1zaA6SwQeHR1ycjb+cyiNufXnvCzAqlXKFPa/lSJhnTIovyK9YaFJMkIr1wIVPSVy dRE3ZOUiKiMddOToviCZU96r7vg2lhdv7el/QO8JyfrQjb7PtjGpF/SZFkghJ2aeA yjsr4IZmKtrw3bKY2QLDz3hTov7UD8kMKsSfSM3lcpjTw7j/isdAxLWr0SWEAmVXa dPIzJvBDgu3nexDq3qZs44CsU09pNXYAmTJH5DVqFBlLzyjV3X/XG0Cp9fUAKy+6i jAc/XTenjItzbX7/7g== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Original-Received: from [92.251.79.197] ([92.251.79.197]) by web-mail.gmx.net (3c-app-mailcom-bs10.server.lan [172.19.170.178]) (via HTTP); Sun, 21 Jul 2024 18:17:02 +0200 Importance: normal Sensitivity: Normal In-Reply-To: <86frs2bu76.fsf@gnu.org> X-UI-Message-Type: mail X-Priority: 3 X-Provags-ID: V03:K1:U/uek++HMJpuTVQ2jgS6ZTI1OR3BTUIU9LbjIDMUwrEGToo+plzumjNY1KdWtGUdCjDzV 69GWwklwTD6KxLQhaNFw0sltU1RJWnJBk2cnC1/nAZZfChkh6OURqcScquoW1XuJM+wyxXGf0hNz teSWclMAa1D0q8tDdKkN2OeoR8P/rXfDl2LUv0RQ9r3oalOTQliDv2lp8jQxPe1r7KTfs9ljBO5V lUrj17IptFvUNrNAHu4+RofczwEpTf+KeP3AZCoKPodcqR625IAqgAAPax4jUVExSvFwkmpw6xN2 Eg= UI-OutboundReport: notjunk:1;M01:P0:6DAPrEkcp/w=;Xh0cCGgE3o7+VdPXYJ0x/Trwg5i CkdrOYTntwBduZkv/HsghX++Jg/dJI5IxNuvst1oPkWQWikeaUxQhXTCHwoeMQZ7CoY76Hay+ pyraduOdAFpEG4fufUhbg+LeoENJY9xx44TxmEoG6ODj80tmYll+yBUW91++3IP0PbrmYl3Do TmWtob0wCF1MwXN1XP1KTftnEOwFBYtbTUXFGQuhayC00BtwDSVSWeEDV62zQz8qaK0Is2Ot4 GUbR+1bMhp5MxdEZPtt/VD9VYRH/MPMu7dHQg7ZSbA2K7YRR2fn9cfAuYJncE9kq9HsJjz4EI k+/uZ585OZfiO9lnY3eWVaOzeH9S815eBg94N7JfUebLvAEylmbHzqLs4pIUmpulF3h/DTncq m5qaG8BArk31PV+WWJq/SmA2iob0OGVZAEPjDQ5jMyHWuzeXVJ1lDd9vbtDaAzgqeH792I1XL snb4XITYBJU5ehMPtWvXq/NzbVS1mj7wEWDeTYhTFRflrRGQ0RYZ0FicEp0DRwqEvAtIVWhY7 DVXtqTARIEVm3vZeoFkuu+0NlQCQo6qg4fGUbjT9//rMqfxBlsX8ADSrtQbDSH9EqNfTjYcOu kmaJJubdQjv0YiNXLPHDAAMxF0zOHUfNkDiG/aaKdpBY40fE5VC58deaKhG/yVgnYgka4wR09 KWX7DdI2eWAQ99lkYi9Hpn5FCcL88OKtBW+Js4ZIqg== Received-SPF: pass client-ip=212.227.15.18; envelope-from=dimech@gmx.com; helo=mout.gmx.net X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:321906 Archived-At: > Sent: Monday, July 22, 2024 at 4:12 AM > From: "Eli Zaretskii" > To: "Max Nikulin" > Cc: emacs-devel@gnu.org > Subject: Re: hypotenuse > > > From: Max Nikulin > > Date: Sun, 21 Jul 2024 22:54:53 +0700 > > > > On 21/07/2024 22:12, Christopher Dimech wrote: > > >>>> (defun hypotenuse (c1 c2) > > >>>> (sqrt (+ (* c1 c1) (* c2 c2))) ) > > > > > > I have a solution to the problem in fortran, but not in elisp. I co= uld > > > include it. Its implementation required serious concentration. > > > > Underflow/overflow issues may be solved with a few lines of code and i= t > > does matter if it is fortran, elisp, or another language (besides > > pathological ones). The problem is to avoid error above 1 ULP. > > Right, overflow and underflow are just the tip of a very large > iceberg. > > > In 2021 hypot implementation in glibc was replaced by a more precise o= ne: > > https://sourceware.org/git/?p=3Dglibc.git;a=3Dcommit;h=3D6c848d70383e1= dbe932ef41723ac0abfdeec7ca8 > > Which is exactly why I said we should use the existing implementation > in the standard library. So we should. I am in agreement.