From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jay Belanger Newsgroups: gmane.emacs.devel,gmane.emacs.bugs Subject: Re: In CVS Emacs, calc-eval gives multiplication higher precidence than division Date: Sun, 07 Sep 2008 11:37:01 -0500 Message-ID: <878wu3j4k2.fsf@gmail.com> References: Reply-To: jay.p.belanger@gmail.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1220805446 16971 80.91.229.12 (7 Sep 2008 16:37:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 7 Sep 2008 16:37:26 +0000 (UTC) Cc: jay.p.belanger@gmail.com, bug-gnu-emacs@gnu.org, emacs-devel@gnu.org To: Francis Litterio Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Sep 07 18:38:21 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KcNHH-0008TU-K4 for ged-emacs-devel@m.gmane.org; Sun, 07 Sep 2008 18:38:19 +0200 Original-Received: from localhost ([127.0.0.1]:47113 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KcNGH-0005PK-L4 for ged-emacs-devel@m.gmane.org; Sun, 07 Sep 2008 12:37:17 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KcNGD-0005OB-1T for emacs-devel@gnu.org; Sun, 07 Sep 2008 12:37:13 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KcNGC-0005NK-Fi for emacs-devel@gnu.org; Sun, 07 Sep 2008 12:37:12 -0400 Original-Received: from [199.232.76.173] (port=37229 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KcNG9-0005Ly-PM; Sun, 07 Sep 2008 12:37:09 -0400 Original-Received: from s3.cableone.net ([24.116.0.229]:42656) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KcNG9-0003Hr-Mz; Sun, 07 Sep 2008 12:37:09 -0400 Original-Received: from belanger (unverified [69.92.109.217]) by S3.cableone.net (CableOne SMTP Service S3) with ESMTP id 5483229-1872270 for multiple; Sun, 07 Sep 2008 09:37:03 -0700 In-Reply-To: (Francis Litterio's message of "Sun, 07 Sep 2008 12:06:38 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-Vpipe: Scanner said ok (av_avast) X-NotAscii: charset=us-ascii X-IP-stats: Incoming Last 2, First 65, in=22, out=0, spam=0 ip=69.92.109.217 X-Originating-IP: 69.92.109.217 X-Abuse-Info: Send abuse complaints to abuse@cableone.net X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 3) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:103632 gmane.emacs.bugs:20286 Archived-At: 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 Jay