From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Pip Cet Newsgroups: gmane.emacs.bugs Subject: bug#42147: 28.0.50; pure vs side-effect-free, missing optimizations? Date: Sat, 4 Jul 2020 22:25:55 +0000 Message-ID: References: <3A9CC2A3-8307-47B2-8D80-795C0AF020E1@acm.org> <0433A879-C98D-4B1A-B85C-A15DA9289099@acm.org> <1621669100.2102667.1593639091621@mail.yahoo.com> <775819003.2516724.1593687594435@mail.yahoo.com> <5F2B4684-34D1-4474-8909-9F435369FE54@acm.org> <705260433.2731607.1593698199171@mail.yahoo.com> <6CF8EE58-9A49-40E7-AA86-48AB39BF94BA@acm.org> <28B19D86-343C-4126-B95F-1F38735F73F2@acm.org> <1288c6a5-545b-f68c-ff6b-7683db3e54c1@cs.ucla.edu> <0AF276D8-FB28-4745-AAE4-DC30E0441F89@acm.org> <793d67e0-68a0-fc53-89a9-0902747d6389@cs.ucla.edu> <83zh8ftfwr.fsf@gnu.org> <672f15b0-04f9-e884-4815-85ca1d1af9bb@cs.ucla.edu> <6d8ba3b1-86b8-3dc8-3d80-17222d436b80@cs.ucla.edu> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="19847"; mail-complaints-to="usenet@ciao.gmane.io" Cc: mattiase@acm.org, Paul Eggert , andrea_corallo@yahoo.it, 42147@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Jul 05 00:27:12 2020 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 1jrqcp-00053B-Aa for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 05 Jul 2020 00:27:11 +0200 Original-Received: from localhost ([::1]:55932 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jrqco-00064G-BC for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 04 Jul 2020 18:27:10 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49770) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jrqcg-00062W-Lv for bug-gnu-emacs@gnu.org; Sat, 04 Jul 2020 18:27:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:48244) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jrqcg-0006C4-C3 for bug-gnu-emacs@gnu.org; Sat, 04 Jul 2020 18:27:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jrqcg-00024t-8I for bug-gnu-emacs@gnu.org; Sat, 04 Jul 2020 18:27:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Pip Cet Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 04 Jul 2020 22:27:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42147 X-GNU-PR-Package: emacs Original-Received: via spool by 42147-submit@debbugs.gnu.org id=B42147.15939016007944 (code B ref 42147); Sat, 04 Jul 2020 22:27:02 +0000 Original-Received: (at 42147) by debbugs.gnu.org; 4 Jul 2020 22:26:40 +0000 Original-Received: from localhost ([127.0.0.1]:59790 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jrqcK-000243-2R for submit@debbugs.gnu.org; Sat, 04 Jul 2020 18:26:40 -0400 Original-Received: from mail-oi1-f175.google.com ([209.85.167.175]:46483) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jrqcH-00023k-US for 42147@debbugs.gnu.org; Sat, 04 Jul 2020 18:26:39 -0400 Original-Received: by mail-oi1-f175.google.com with SMTP id l63so27844063oih.13 for <42147@debbugs.gnu.org>; Sat, 04 Jul 2020 15:26:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=QH9tS8d9obNJvghmeSAkh9Ai8a4zOQHdgLwLob2YU64=; b=PFKE/17VQhplwjNqts+uhRUKs1H5X5lZxS4rnzKtA338Dk2SRTWkjnu+R/BkaY8vAv eCe1UbRTKAdmZxkU1zomHz/eP1hIA6savBayD344QiT/1qjZL4+LJQohUH7+A1o2sg6P yy4Qc/+635XT710+dI4fMs78Jfw2PkhKQgH50MKakdoS+k1a1YVYjVyOw3WFTHfYDE7x rmTvzvu1+7MWKiuUeFarahw74BavYHNOvf3ZaTnUNxOl5WCk/AOLUxRsIaTsMoYzEnNh /7QGLnf2Lg1hoTDbfTWwkU0W7lpryC0IAWO/xah2GsxrdOZ8NzIlxAlN3wU2l+3aRupK 1Yxw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=QH9tS8d9obNJvghmeSAkh9Ai8a4zOQHdgLwLob2YU64=; b=NU6rGnhgy4xIqiLBwHARvIe8cflEi5EnjL3cXgTyr+6UebPjLGOFDD/jhMQ/GORShj cwPU51TCYmXKeYuNLTx3/rr+Ezv0Dq4Xu0wYaoPbQsZk1QyA+738hTEPLAboZHLFfKhI 50jY8ZiU3JltwHcB2WEdGnFqC9YVUXpooray7LqKEekHbEWX6/zsRLYkDfG3ad3GvRmz fTrrOU1wVOU6B3wnv8JWdYu4iKTsPfafQ7fCL5317yw/Wj9Rk4wEPHDAG9PMms3l0M46 JCRSEzhCeYEaHJHlKk0kqWsZycGcAF2XOQtQ4AJWpsPk1kC1g/2CEVASWQ/wISFxQtnU CVvA== X-Gm-Message-State: AOAM532UqM4o5T/hlZAaPwWHAI5IbvztfG5MW9JjMsE2HLaTzH6lpUvf NMSLhRz00AkVqns1ymCb42zv6k6PWRNdk6kDmtY= X-Google-Smtp-Source: ABdhPJyq28/brVtkruybS/ZSSUW22+z27uRFdtVDujtK1IsrgKgo9NWOdVGJEv3rhbe+yNu4PvEFhVMDgfUwpXiiibM= X-Received: by 2002:aca:b155:: with SMTP id a82mr31141276oif.122.1593901592295; Sat, 04 Jul 2020 15:26:32 -0700 (PDT) In-Reply-To: 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: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:182721 Archived-At: On Sat, Jul 4, 2020 at 9:05 PM Stefan Monnier wrote: > > So it's a GCC bug? Wouldn't it be better to fix that? > > Not really, no: the x87 hardware makes it difficult to get the exact > behavior of 64bit floats, so either you live with "almost" the right > behavior or you don't use the x87 hardware (which on pre-SSE2 hardware > implies a massive slow down on floating point operations). Precisely. Those are the two options GCC should offer, instead of (or in addition to) three degrees of wrongness. This is obsolete hardware which does not, apparently, provide any support for adding two IEEE 754 64-bit floats. Pretending it does is not helpful and, at the very least, a bug in the documentation. > >> Several GNU/Linux distributions have already dropped support for x86-only > >> hardware like the circa-2001 Intel Mobile Pentium III-M in your laptop. On the > >> distributions that still support i686, you can still build and run Emacs on your > >> laptop (which has SSE but not SSE2) by configuring with CFLAGS='-msse > >> -mfpmath=sse -fexcess-precision=standard'; this should avoid some (but not all) > >> of the rounding problems. FWIW, that doesn't seem to have any effect here, it just uses x87 instructions. > If I need to change the flags, then I'm much more likely to just use the > "normal" compilation option: I actually couldn't care less about the > potential differences in rounding. > > I'm actually not completely sure why we care about those minor > rounding differences. Neither am I. If the idea is to standardize Emacs on a single floating-point representation, let's at least use the 61-bit floats Paul suggested a while back? (Incidentally, I believe those can be implemented somewhat more efficiently on x87 hardware). Or we could go with bignum ratios or GMP floats.