From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Arthur Miller Newsgroups: gmane.emacs.help Subject: Re: What is 0.01 here not 0.01 here 0.009999999999999? Date: Sat, 03 Apr 2021 06:49:42 +0200 Message-ID: References: <837dlkg4xq.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21467"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (windows-nt) Cc: help-gnu-emacs@gnu.org To: Eli Zaretskii Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sat Apr 03 06:50:16 2021 Return-path: Envelope-to: geh-help-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 1lSYEi-0005Tf-1z for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 03 Apr 2021 06:50:16 +0200 Original-Received: from localhost ([::1]:44040 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lSYEh-0004y3-3Q for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 03 Apr 2021 00:50:15 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33664) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lSYEL-0004xt-OE for help-gnu-emacs@gnu.org; Sat, 03 Apr 2021 00:49:53 -0400 Original-Received: from mail-oln040092074073.outbound.protection.outlook.com ([40.92.74.73]:23968 helo=EUR04-DB3-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lSYEJ-0000QU-Ov; Sat, 03 Apr 2021 00:49:53 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Kna/V779N5yUsYGqwfP4JaJtWM/RPrjQYEopa46M6tko9wh2GuzwgMiZT8a50zXAdS9kE2KlSHl20+05WujU89/b7CEq+aBiI3o0Mz/e5MqvfW/tuRClD+Mb0qB+XUX7z2C3bXAQFN6g7Nd0akZJk7EiV0QkyclJ3nsfrQ8IFxSazbtp9id9oRpirVnkxtrOTKlk9var4L43CZrBVX0Bs/DxJ3V855EVlDQxM7ou81MbxKZN+g7bdxbS0iIM2W5gC/2qdDTXLrFttnxjQvtIEZmQKBgCNJ/8TJM1saDzNclcwI5NxprQMIEO7nOmtkpmLZ4zu6CKBF97mDe2xrm9NA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=B4RAGN7eDVaIos6GXb4E7ByeeWZ5gNQlukaRrDVrjO8=; b=bTep91zBWD1sZ6jiposPPoRyvgsgjYx6AAD/Q29QkVtN1RwpHSSmbYt/3cYhDglSlRolXV4JYT0Cc5HLRYOUJq8LdI+oFyx3yggW4e8kDRG7VgvFvgyivYzaMLcecbbLeZOFCeWsasHkYLrDY9+Tr9Js6PNN5igUxu5IVTQZb2UHwp8rN40uebFsIZvS9I/tC8OkNh12LxNe5ZaovlNIdAdSQiCz905X1TqYlEW+A4qtPSI56oKJpSwO99qzPKs7Roj8u0qgAAt2UXkocnlXLCwfKXEYn8lPQG8ku7jbniukLP6XkfiCHEwMw5WA2UcbNQ6TqvhCSYSCNGs18Y86qg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=live.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=B4RAGN7eDVaIos6GXb4E7ByeeWZ5gNQlukaRrDVrjO8=; b=F3nplioSHdPHnRGmx2HEdxyNd8caEImODkzUNew53LtFg/LS+n8qxBWz6bR0c5VULpe7VWFSlAExy7CWD/tWh1/97BnZPO0IISVhOSnEvF7yi6LBxHGj9OZAeTimRBjwWV8hdBF3N4tAcx+wfaJGihpBYW2GHe4pQoBR7j2b+yk4gZ0YRCiFRtsqNDKE80fGAou+JejloLfeuZ7vtjjraAH+/yFq7TUVqAs0bca52qg+tcbAruKgiQZDqlDoinW9DTTMAwJYPcFvBaueOE6TrTLHkMdd5XXPTPD8IQKuLasw6//xSKNPV2+yoCvRS/IteyE2ha3KCU4CKMnehAhrRg== Original-Received: from VI1EUR04FT039.eop-eur04.prod.protection.outlook.com (2a01:111:e400:7e0e::46) by VI1EUR04HT186.eop-eur04.prod.protection.outlook.com (2a01:111:e400:7e0e::178) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3999.28; Sat, 3 Apr 2021 04:49:47 +0000 Original-Received: from AM9PR09MB4977.eurprd09.prod.outlook.com (2a01:111:e400:7e0e::4f) by VI1EUR04FT039.mail.protection.outlook.com (2a01:111:e400:7e0e::315) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3999.28 via Frontend Transport; Sat, 3 Apr 2021 04:49:47 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:ABC923FDA74F1245F5D8F7DFEB12F3B3D998EBE0F3E10F2125A74FEC7BA81586; UpperCasedChecksum:5D15F461FD56F4F517707287F8460DD18173A1E792629261990DF432436DFBB5; SizeAsReceived:7494; Count:46 Original-Received: from AM9PR09MB4977.eurprd09.prod.outlook.com ([fe80::2103:e705:bc0c:5a8b]) by AM9PR09MB4977.eurprd09.prod.outlook.com ([fe80::2103:e705:bc0c:5a8b%6]) with mapi id 15.20.3999.032; Sat, 3 Apr 2021 04:49:43 +0000 In-Reply-To: (Jean Louis's message of "Fri, 2 Apr 2021 20:07:43 +0300") X-TMN: [4bT3QCmF7p52Hk5DHBZij2+iFETlw7ui] X-ClientProxiedBy: AM7PR03CA0011.eurprd03.prod.outlook.com (2603:10a6:20b:130::21) To AM9PR09MB4977.eurprd09.prod.outlook.com (2603:10a6:20b:304::20) X-Microsoft-Original-Message-ID: <825z14ug49.fsf@live.com> X-MS-Exchange-MessageSentRepresentingType: 1 Original-Received: from HP-Laptop.homepc (81.232.177.30) by AM7PR03CA0011.eurprd03.prod.outlook.com (2603:10a6:20b:130::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3999.28 via Frontend Transport; Sat, 3 Apr 2021 04:49:42 +0000 X-MS-PublicTrafficType: Email X-IncomingHeaderCount: 46 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-Correlation-Id: 939c977d-5144-418b-92be-08d8f65be5b8 X-MS-TrafficTypeDiagnostic: VI1EUR04HT186: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: PT18sh7h3eVU8KjbmwLtoIMNcONWpZvnS8nas72ekEki8HQQka6I98thSYCiHGfTv2U1EYMpQzSGBJIwTAW6h0IYVBk1qHuu0Z75PskhAjzYgbHSDPDfd8huwWkNKeAsWsHHVEHWI+Kl4tvYTS0SmwxSQ7FEpALl0RmRYw2c+GX4E0PMo/Lsi6OFW45ntCpeJG5z8kzhN7KK0WOYvIVjf2e/KKHbtephRReNVMkaqd29D/lMRT+mB3rK5AqwkOvftGi67WM/jciNGwFEJyFvYQSiGI7n9kpp74YdxsK+MdjGE24314VZQheSIlNSwB7wGTnqM+Tc2u5NJC78PDot1hsAdI8cbOwhgWCQEFicgXSV93byGzMYhdL6F4Pvf8X0N1MCUTDndWd9uE3OsMGQNi0KmED5Z+FwKJax3YKpc10= X-MS-Exchange-AntiSpam-MessageData: mfiOhNJyh+ldGGyQPCbCgYz+miRJ6EyTlKVBwmZsr/N4nshxhKO/qpifDE1KOQTzxEdYYF2NBFsn+DsKUwHCuDyWYU1asraIOCekzLgltN6U82P+rjnF2mQXMe8teLTSLWAiAMaUfVw/X+YGa4f/qA== X-OriginatorOrg: live.com X-MS-Exchange-CrossTenant-Network-Message-Id: 939c977d-5144-418b-92be-08d8f65be5b8 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Apr 2021 04:49:43.2218 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-AuthSource: VI1EUR04FT039.eop-eur04.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: Internet X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1EUR04HT186 Received-SPF: pass client-ip=40.92.74.73; envelope-from=arthur.miller@live.com; helo=EUR04-DB3-obe.outbound.protection.outlook.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, MSGID_FROM_MTA_HEADER=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:128834 Archived-At: Jean Louis writes: > * Eli Zaretskii [2021-04-02 17:03]: >> Suggested reading: >> >> https://www.itu.dk/~sestoft/bachelor/IEEE754_article.pdf > > Thank you, I will read. From: > https://en.wikipedia.org/wiki/Floating-point_arithmetic#Accuracy_problems > > It seem that floating point arithmetic is killer at certain > situations, so I will just make sure not to fiddle with missiles. So could be integers as well, these were (fortunately) not killers: https://hownot2code.com/2016/09/02/a-space-error-370-million-for-an-integer-overflow/ https://medium.com/@jollyfish/integer-overflow-underflow-and-floating-point-imprecision-6ba869a99033