From unknown Sat Jun 21 05:04:52 2025 X-Loop: don@donarmstrong.com Subject: bug#924: In CVS Emacs, calc-eval gives multiplication higher precidence than division Reply-To: "Lennart Borgman (gmail)" , 924@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 21:25:09 +0000 Resent-Message-ID: Resent-Sender: don@donarmstrong.com X-Emacs-PR-Message: report 924 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by submit@emacsbugs.donarmstrong.com id=B.122082241616398 (code B ref -1); Sun, 07 Sep 2008 21:25:09 +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=-6.0 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:20:16 +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 m87LKBqW016209 for ; Sun, 7 Sep 2008 14:20:12 -0700 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KcRg2-0007u7-Oj for bug-gnu-emacs@gnu.org; Sun, 07 Sep 2008 17:20:10 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KcRg1-0007ts-8n for bug-gnu-emacs@gnu.org; Sun, 07 Sep 2008 17:20:10 -0400 Received: from [199.232.76.173] (port=41893 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KcRg1-0007tp-3U; Sun, 07 Sep 2008 17:20:09 -0400 Received: from ch-smtp02.sth.basefarm.net ([80.76.149.213]:45617) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KcRg0-0000Qq-KX; Sun, 07 Sep 2008 17:20:08 -0400 Received: from c83-254-151-87.bredband.comhem.se ([83.254.151.87]:64805 helo=[127.0.0.1]) by ch-smtp02.sth.basefarm.net with esmtp (Exim 4.68) (envelope-from ) id 1KcRfu-00062O-7I; Sun, 07 Sep 2008 23:20:05 +0200 Message-ID: <48C4457C.4020506@gmail.com> Date: Sun, 07 Sep 2008 23:19:56 +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 CC: jay.p.belanger@gmail.com, bug-gnu-emacs@gnu.org, Francis Litterio , emacs-devel@gnu.org References: <878wu3j4k2.fsf@gmail.com> <873akbitie.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 1KcRfu-00062O-7I. X-Scan-Signature: ch-smtp02.sth.basefarm.net 1KcRfu-00062O-7I cb4d3f458180c06436c16a40e5242412 X-detected-kernel: by monty-python.gnu.org: Linux 2.6? (barebone, rare!) Stefan Monnier wrote: >> 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. But that is a bit different from (a/b)*c, a/(b*c) ... - otherwise I agree.