From unknown Tue Jun 17 20:13:16 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#923 <923@debbugs.gnu.org> To: bug#923 <923@debbugs.gnu.org> Subject: Status: In CVS Emacs, calc-eval gives multiplication higher precidence than division Reply-To: bug#923 <923@debbugs.gnu.org> Date: Wed, 18 Jun 2025 03:13:16 +0000 retitle 923 In CVS Emacs, calc-eval gives multiplication higher precidence = than division reassign 923 emacs submitter 923 Stefan Monnier severity 923 normal thanks From monnier@iro.umontreal.ca Sun Sep 7 14:15:45 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-5.8 required=4.0 tests=AWL,BAYES_00, RCVD_IN_DNSWL_LOW autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at submit) by emacsbugs.donarmstrong.com; 7 Sep 2008 21:15:46 +0000 Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m87LFgD3015125 for ; Sun, 7 Sep 2008 14:15:43 -0700 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KcRbh-0006wa-TH for bug-gnu-emacs@gnu.org; Sun, 07 Sep 2008 17:15:41 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KcRbg-0006tP-Gu for bug-gnu-emacs@gnu.org; Sun, 07 Sep 2008 17:15:41 -0400 Received: from [199.232.76.173] (port=59565 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KcRbg-0006sw-8G; Sun, 07 Sep 2008 17:15:40 -0400 Received: from ironport2-out.pppoe.ca ([206.248.154.182]:24896 helo=ironport2-out.teksavvy.com) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KcRbf-0008E9-W0; Sun, 07 Sep 2008 17:15:40 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AiQFAGjhw0hFxIqP/2dsb2JhbACBZbAVgWaBBw X-IronPort-AV: E=Sophos;i="4.32,353,1217822400"; d="scan'208";a="26488125" Received: from 69-196-138-143.dsl.teksavvy.com (HELO ceviche.home) ([69.196.138.143]) by ironport2-out.teksavvy.com with ESMTP; 07 Sep 2008 17:15:39 -0400 Received: by ceviche.home (Postfix, from userid 20848) id 94C4FB4062; Sun, 7 Sep 2008 17:15:38 -0400 (EDT) From: Stefan Monnier To: jay.p.belanger@gmail.com Cc: bug-gnu-emacs@gnu.org, Francis Litterio , emacs-devel@gnu.org Subject: Re: In CVS Emacs, calc-eval gives multiplication higher precidence than division Message-ID: References: <878wu3j4k2.fsf@gmail.com> <873akbitie.fsf@gmail.com> Date: Sun, 07 Sep 2008 17:15:38 -0400 In-Reply-To: <873akbitie.fsf@gmail.com> (Jay Belanger's message of "Sun, 07 Sep 2008 15:35:37 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-detected-kernel: by monty-python.gnu.org: Genre and OS details not recognized. >>> That's not a bug. While many systems give division a higher precendence >>> than multiplication, that isn't a universal rule. >> Actually, I don't know of any system that gives higher precedence to >> division. > According to Wikipedia: > An expression like 1/2x is interpreted as 1/(2x) by TI-82, but as > (1/2)x by TI-83. While the first interpretation may be expected by > some users, only the latter is in agreement with the standard rules > stated above. That could be due to a higher precedence, but could also be due to an equal precedence together with left-associativity. Given that (a*b)/c is often mathematically equal to a*(b/c), the difference is generally hard to see, unless rounding comes into play. All textbooks and language references I know use the "equal precedence and left associativity" rule rather than giving higher precedence to the division. >> The general rule that (AFAIK) all programming languages >> follow (other than those that don't use infix-with-precedence, such as >> Lisp and Smalltalk) is that * and / have the same precedence (and are >> left associative). > That behavior is available, but you have to ask for it by setting > `calc-multiplication-has-precedence' to nil. I know. But we're talking about the default behavior. Stefan From rgm@gnu.org Sun Sep 7 19:19:18 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-8.4 required=4.0 tests=AWL,BAYES_00,MISSING_SUBJECT, NOSUBJECT,RCVD_IN_DNSWL_MED,X_DEBBUGS_NO_ACK autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at control) by emacsbugs.donarmstrong.com; 8 Sep 2008 02:19:18 +0000 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m882JFrM022956 for ; Sun, 7 Sep 2008 19:19:17 -0700 Received: from rgm by fencepost.gnu.org with local (Exim 4.67) (envelope-from ) id 1KcWJn-0002IS-Jn; Sun, 07 Sep 2008 22:17:31 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <18628.35643.557320.67844@fencepost.gnu.org> Date: Sun, 7 Sep 2008 22:17:31 -0400 From: Glenn Morris To: control X-Attribution: GM X-Mailer: VM (www.wonderworks.com/vm), GNU Emacs (www.gnu.org/software/emacs) X-Hue: black X-Ran: ~U?tZ9#w)k6ZX X-Debbugs-No-Ack: yes forcemerge 914 915 918 920 921 923 924 From rgm@gnu.org Mon Sep 8 13:28:10 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-8.4 required=4.0 tests=AWL,BAYES_00,MISSING_SUBJECT, NOSUBJECT,RCVD_IN_DNSWL_MED,X_DEBBUGS_NO_ACK autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at control) by emacsbugs.donarmstrong.com; 8 Sep 2008 20:28:10 +0000 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m88KS7Yw021722 for ; Mon, 8 Sep 2008 13:28:08 -0700 Received: from rgm by fencepost.gnu.org with local (Exim 4.67) (envelope-from ) id 1KcnJU-0001Hq-TC; Mon, 08 Sep 2008 16:26:20 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <18629.35436.837734.98648@fencepost.gnu.org> Date: Mon, 8 Sep 2008 16:26:20 -0400 From: Glenn Morris To: control X-Attribution: GM X-Mailer: VM (www.wonderworks.com/vm), GNU Emacs (www.gnu.org/software/emacs) X-Hue: yellow X-Ran: c}IvT%;AnAHb1{rp6ts&HY4kM:e"?U?h75JSDU*[NLr,LD)AjJo(,m}k@agFN!vuvw?{]` X-Debbugs-No-Ack: yes forcemerge 914 928 929 930 From rgm@gnu.org Mon Sep 8 13:50:45 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-8.4 required=4.0 tests=AWL,BAYES_00,MISSING_SUBJECT, NOSUBJECT,RCVD_IN_DNSWL_MED,X_DEBBUGS_NO_ACK autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at control) by emacsbugs.donarmstrong.com; 8 Sep 2008 20:50:45 +0000 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m88Kog7Z029949 for ; Mon, 8 Sep 2008 13:50:43 -0700 Received: from rgm by fencepost.gnu.org with local (Exim 4.67) (envelope-from ) id 1KcnfM-0002Lg-Me; Mon, 08 Sep 2008 16:48:56 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <18629.36792.586608.584219@fencepost.gnu.org> Date: Mon, 8 Sep 2008 16:48:56 -0400 From: Glenn Morris To: control X-Attribution: GM X-Mailer: VM (www.wonderworks.com/vm), GNU Emacs (www.gnu.org/software/emacs) X-Hue: red X-Ran: T^isY|:S+1b#ZMVoY*it2=GpbZZC~9U`VRgc:Eq49yL(-"IpL@k/%giKiuba?REhg(.Yi* X-Debbugs-No-Ack: yes forcemerge 914 932 933 stop please take bug-gnu-emacs out of the cc. :( From rgm@gnu.org Mon Sep 8 13:53:24 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-6.8 required=4.0 tests=AWL,BAYES_00,MISSING_SUBJECT, NOSUBJECT,RCVD_IN_DNSWL_MED,UNRESOLVED_TEMPLATE,X_DEBBUGS_NO_ACK autolearn=no version=3.2.3-bugs.debian.org_2005_01_02 Received: (at control) by emacsbugs.donarmstrong.com; 8 Sep 2008 20:53:24 +0000 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m88KrLvI030285 for ; Mon, 8 Sep 2008 13:53:22 -0700 Received: from rgm by fencepost.gnu.org with local (Exim 4.67) (envelope-from ) id 1Kcnhw-0002lw-FZ; Mon, 08 Sep 2008 16:51:36 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <18629.36952.422449.252674@fencepost.gnu.org> Date: Mon, 8 Sep 2008 16:51:36 -0400 From: Glenn Morris To: control X-Attribution: GM X-Mailer: VM (www.wonderworks.com/vm), GNU Emacs (www.gnu.org/software/emacs) X-Hue: black X-Ran: p"k7Pf/kjn3SyU{?N*.c4"x0I3nRokfYLO$9^Y(=g.6Agq9d0?GJq]lKJ,9fZP%XIGPvu= X-Debbugs-No-Ack: yes forcemerge 914 934 From rgm@gnu.org Mon Sep 8 15:22:15 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-8.4 required=4.0 tests=AWL,BAYES_00,MISSING_SUBJECT, NOSUBJECT,RCVD_IN_DNSWL_MED,X_DEBBUGS_NO_ACK autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at control) by emacsbugs.donarmstrong.com; 8 Sep 2008 22:22:15 +0000 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m88MMC9i029905 for ; Mon, 8 Sep 2008 15:22:13 -0700 Received: from rgm by fencepost.gnu.org with local (Exim 4.67) (envelope-from ) id 1Kcp5u-0006LW-Jc; Mon, 08 Sep 2008 18:20:26 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <18629.42282.417143.910278@fencepost.gnu.org> Date: Mon, 8 Sep 2008 18:20:26 -0400 From: Glenn Morris To: control X-Attribution: GM X-Mailer: VM (www.wonderworks.com/vm), GNU Emacs (www.gnu.org/software/emacs) X-Hue: green X-Ran: fNvn,:U^mRkQq_\C&M'8BM'%?Cm`=>A=QD(i-BC)}k@LmWKU`UT2Vty[JduHzqtCA>9W$i X-Debbugs-No-Ack: yes forcemerge 914 937 stop the bug report that would not die... From lekktu@gmail.com Tue Sep 9 07:41:25 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-2.1 required=4.0 tests=AWL,BAYES_00,MISSING_SUBJECT, NOSUBJECT autolearn=no version=3.2.3-bugs.debian.org_2005_01_02 Received: (at control) by emacsbugs.donarmstrong.com; 9 Sep 2008 14:41:26 +0000 Received: from mail-gx0-f19.google.com (mail-gx0-f19.google.com [209.85.217.19]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m89EfITS017384 for ; Tue, 9 Sep 2008 07:41:19 -0700 Received: by gxk12 with SMTP id 12so3900969gxk.1 for ; Tue, 09 Sep 2008 07:41:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:mime-version:content-type:content-transfer-encoding :content-disposition; bh=lSLyOfnVyoZJQu/bgjvyfJorcpQVLzq8BTuN9sXPOKc=; b=r+L+cBfkSYKVJf1g5mv3H9zDlI/2Vb44fQaMoBQad5PRH4lRrXCe0q013ejrp2WQqq ZD0F46kfNULC3Zs+8vnnI0BxbKiD0OYuApFnBcV4FTfe+16xfCwHLuO163uibgA0ytAR KcEE6AIdW3/uTZYP/6FZC/zn3uIcrg3sL3ypU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type :content-transfer-encoding:content-disposition; b=ldkoec3Z7Wf01SyVg0th+Jnh8p2msWdoVra48FLr/LOjNxYRwJFOordSnwqUmA65V8 owDTgIWkNvqhnMvIuThV3GtE8jmYKScdp2dSpG94Wpb68ET2R7Bv09qWlA64WAqLIxeF 2tBVGVrQTGre4QrDULGwe0jPocQ530UtFXOL8= Received: by 10.100.166.9 with SMTP id o9mr17408754ane.64.1220971272999; Tue, 09 Sep 2008 07:41:12 -0700 (PDT) Received: by 10.100.13.13 with HTTP; Tue, 9 Sep 2008 07:41:12 -0700 (PDT) Message-ID: Date: Tue, 9 Sep 2008 16:41:12 +0200 From: "Juanma Barranquero" To: control@debbugs.gnu.org Subject: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline merge 894 945 forcemerge 914 941 944 quit From unknown Tue Jun 17 20:13:16 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: $requester Subject: Internal Control Message-Id: bug archived. Date: Wed, 08 Oct 2008 14:24:03 +0000 User-Agent: Fakemail v42.6.9 # A New Hope # A log time ago, in a galaxy far, far away # something happened. # # Magically this resulted in the following # action being taken, but this fake control # message doesn't tell you why it happened # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator