From unknown Mon Aug 11 12:54:13 2025 X-Loop: don@donarmstrong.com Subject: bug#918: In CVS Emacs, calc-eval gives multiplication higher precidence than division Reply-To: Francis Litterio , 918@debbugs.gnu.org Resent-From: Francis Litterio Original-Sender: news Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Sun, 07 Sep 2008 18:30:03 +0000 Resent-Message-ID: Resent-Sender: don@donarmstrong.com X-Emacs-PR-Message: report 918 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by submit@emacsbugs.donarmstrong.com id=B.122081161617695 (code B ref -1); Sun, 07 Sep 2008 18:30:03 +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.0 required=4.0 tests=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 18: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 m87IKBfv017519 for ; Sun, 7 Sep 2008 11:20:13 -0700 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KcOrq-0003U8-Ps for bug-gnu-emacs@gnu.org; Sun, 07 Sep 2008 14:20:10 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KcOrp-0003Tr-Fb for bug-gnu-emacs@gnu.org; Sun, 07 Sep 2008 14:20:09 -0400 Received: from [199.232.76.173] (port=58524 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KcOrp-0003To-6O for bug-gnu-emacs@gnu.org; Sun, 07 Sep 2008 14:20:09 -0400 Received: from main.gmane.org ([80.91.229.2]:49932 helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KcOro-0000ro-Tv for bug-gnu-emacs@gnu.org; Sun, 07 Sep 2008 14:20:09 -0400 Received: from root by ciao.gmane.org with local (Exim 4.43) id 1KcOri-00064V-FX for bug-gnu-emacs@gnu.org; Sun, 07 Sep 2008 18:20:02 +0000 Received: from node153.194.100.208.1dial.com ([208.100.194.153]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 07 Sep 2008 18:20:02 +0000 Received: from flitterio by node153.194.100.208.1dial.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 07 Sep 2008 18:20:02 +0000 X-Injected-Via-Gmane: http://gmane.org/ To: bug-gnu-emacs@gnu.org From: Francis Litterio Date: Sun, 07 Sep 2008 14:15:35 -0400 Lines: 28 Message-ID: References: <878wu3j4k2.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: node153.194.100.208.1dial.com X-Draft-From: ("nntp+news.gmane.org:gmane.emacs.devel" 103632) X-Random-Quote: I'm a great believer in luck, and I find the harder I work the more I have of it. -- Thomas Jefferson User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (windows-nt) Cancel-Lock: sha1:YTCfwnvj5cYNTUtF4y5ViCYT0hY= Sender: news Cc: emacs-devel@gnu.org X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) Jay Belanger wrote: > Francis Litterio writes: > ... >> In CVS Emacs, function calc-eval (in lisp/calc/calc.el) gives >> multiplication higher precidence than division. > > That's not a bug. While many systems give division a higher precendence > than multiplication, that isn't a universal rule. Calc has always given > multiplication a higher precendence, and something like > 1 / 2 * 1000 > can be viewed as shorthand for > 1 > -------- > 2 * 1000 > Some people don't like this, some people do, but this choice is > established Calc behavior and is highlighted in the manual. To divide > first, it's probably better style regardless to put in the parentheses: > (1 / 2) * 1000 Thanks, Jay. My apologies for rehashing old news. I just discovered the discussion thread at: http://thread.gmane.org/gmane.emacs.devel/69436 -- Fran