From unknown Sat Jun 21 10:45:19 2025 X-Loop: don@donarmstrong.com Subject: bug#920: In CVS Emacs, calc-eval gives multiplication higher precidence than division Reply-To: Stefan Monnier , 920@debbugs.gnu.org Resent-From: Stefan Monnier Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Sun, 07 Sep 2008 19:55:05 +0000 Resent-Message-ID: Resent-Sender: don@donarmstrong.com X-Emacs-PR-Message: report 920 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by submit@emacsbugs.donarmstrong.com id=B.122081682315571 (code B ref -1); Sun, 07 Sep 2008 19:55:05 +0000 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 19:47:03 +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 m87Jl0pA015565 for ; Sun, 7 Sep 2008 12:47:01 -0700 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KcQDq-0001nj-Hl for bug-gnu-emacs@gnu.org; Sun, 07 Sep 2008 15:46:58 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KcQDo-0001ly-9e for bug-gnu-emacs@gnu.org; Sun, 07 Sep 2008 15:46:57 -0400 Received: from [199.232.76.173] (port=50524 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KcQDo-0001lv-1u; Sun, 07 Sep 2008 15:46:56 -0400 Received: from ironport2-out.pppoe.ca ([206.248.154.182]:54951 helo=ironport2-out.teksavvy.com) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KcQDn-0007Qb-6p; Sun, 07 Sep 2008 15:46:55 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AiQFAFTMw0hFxIqP/2dsb2JhbACBZbAOgWaBBw X-IronPort-AV: E=Sophos;i="4.32,352,1217822400"; d="scan'208";a="26486481" 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 15:46:53 -0400 Received: by ceviche.home (Postfix, from userid 20848) id 360A9B4062; Sun, 7 Sep 2008 15:46:52 -0400 (EDT) From: Stefan Monnier To: jay.p.belanger@gmail.com Cc: Francis Litterio , bug-gnu-emacs@gnu.org, emacs-devel@gnu.org Message-ID: References: <878wu3j4k2.fsf@gmail.com> Date: Sun, 07 Sep 2008 15:46:52 -0400 In-Reply-To: <878wu3j4k2.fsf@gmail.com> (Jay Belanger's message of "Sun, 07 Sep 2008 11:37:01 -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. 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). I think Calc is plainly wrong is giving higher precedence to the multiplication because it's completely non standard. But since I don't use Calc much and since it's been that way for a while, I won't fight for it. Stefan From unknown Sat Jun 21 10:45:19 2025 X-Loop: don@donarmstrong.com Subject: bug#920: In CVS Emacs, calc-eval gives multiplication higher precidence than division Reply-To: "Lennart Borgman (gmail)" , 920@debbugs.gnu.org Resent-From: "Lennart Borgman (gmail)" Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Sun, 07 Sep 2008 20:25:06 +0000 Resent-Message-ID: Resent-Sender: don@donarmstrong.com X-Emacs-PR-Message: report 920 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by submit@emacsbugs.donarmstrong.com id=B.122081877126703 (code B ref -1); Sun, 07 Sep 2008 20:25:06 +0000 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=-7.5 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER, 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 20:19:31 +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 m87KJQwf026690 for ; Sun, 7 Sep 2008 13:19:28 -0700 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KcQjE-0007Tn-PS for bug-gnu-emacs@gnu.org; Sun, 07 Sep 2008 16:19:24 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KcQjC-0007QE-7O for bug-gnu-emacs@gnu.org; Sun, 07 Sep 2008 16:19:23 -0400 Received: from [199.232.76.173] (port=34042 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KcQjB-0007Q6-Vg; Sun, 07 Sep 2008 16:19:22 -0400 Received: from ch-smtp02.sth.basefarm.net ([80.76.149.213]:45193) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KcQjB-0008AJ-4b; Sun, 07 Sep 2008 16:19:21 -0400 Received: from c83-254-151-87.bredband.comhem.se ([83.254.151.87]:64063 helo=[127.0.0.1]) by ch-smtp02.sth.basefarm.net with esmtp (Exim 4.68) (envelope-from ) id 1KcQj5-0002WK-9B; Sun, 07 Sep 2008 22:19:16 +0200 Message-ID: <48C43738.7090604@gmail.com> Date: Sun, 07 Sep 2008 22:19:04 +0200 From: "Lennart Borgman (gmail)" User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.9) Gecko/20071031 Thunderbird/2.0.0.9 Mnenhy/0.7.5.666 MIME-Version: 1.0 To: Stefan Monnier , 920@debbugs.gnu.org CC: jay.p.belanger@gmail.com, bug-gnu-emacs@gnu.org, Francis Litterio , emacs-devel@gnu.org References: <878wu3j4k2.fsf@gmail.com> In-Reply-To: X-Enigmail-Version: 0.95.7 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Antivirus: avast! (VPS 080907-0, 2008-09-07), Outbound message X-Antivirus-Status: Clean X-Originating-IP: 83.254.151.87 X-ACL-Warn: Too high rate of unknown addresses received from you X-Scan-Result: No virus found in message 1KcQj5-0002WK-9B. X-Scan-Signature: ch-smtp02.sth.basefarm.net 1KcQj5-0002WK-9B b292116b68e14c4c3d42f4670199c28c X-detected-kernel: by monty-python.gnu.org: Linux 2.6? (barebone, rare!) X-CrossAssassin-Score: 2 Stefan Monnier wrote: > I think Calc is plainly wrong is giving higher precedence to the > multiplication because it's completely non standard. But since I don't > use Calc much and since it's been that way for a while, I won't fight > for it. I think there are good reasons fixing it: - There are enough people out there that are not aware of the precedence rules. Making calc follow them would help remove that confusion. (And I would feel safer when crossing bridges.) - Not following standards makes Emacs harder to use for new users.