From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Lennart Borgman (gmail)" Newsgroups: gmane.emacs.devel Subject: Re: bug#914: In CVS Emacs, calc-eval gives multiplication higher precidence than division Date: Tue, 09 Sep 2008 01:44:46 +0200 Message-ID: <48C5B8EE.3060306@gmail.com> References: <878wu3j4k2.fsf@gmail.com> <86wshn3df0.fsf@blue.stonehenge.com> <7D0B0AA3-AED7-456B-AAAB-D72CABD19CFB@gmail.com> <48C58D7B.1060707@gmail.com> <86k5dmxtaz.fsf@blue.stonehenge.com> <48C590E2.4040804@gmail.com> <87abeijlb9.fsf@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1220917522 31336 80.91.229.12 (8 Sep 2008 23:45:22 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 8 Sep 2008 23:45:22 +0000 (UTC) Cc: emacs-devel@gnu.org, Carsten Dominik , "Randal L. Schwartz" To: jay.p.belanger@gmail.com Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Sep 09 01:46:17 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 1KcqQw-0006Wa-SW for ged-emacs-devel@m.gmane.org; Tue, 09 Sep 2008 01:46:15 +0200 Original-Received: from localhost ([127.0.0.1]:55792 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KcqPw-0008M0-Oi for ged-emacs-devel@m.gmane.org; Mon, 08 Sep 2008 19:45:12 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KcqPo-0008Ke-3Z for emacs-devel@gnu.org; Mon, 08 Sep 2008 19:45:04 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KcqPl-0008JG-Vn for emacs-devel@gnu.org; Mon, 08 Sep 2008 19:45:03 -0400 Original-Received: from [199.232.76.173] (port=42024 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KcqPl-0008Is-Mn for emacs-devel@gnu.org; Mon, 08 Sep 2008 19:45:01 -0400 Original-Received: from ch-smtp01.sth.basefarm.net ([80.76.149.212]:36557) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KcqPk-0002Wx-O1 for emacs-devel@gnu.org; Mon, 08 Sep 2008 19:45:01 -0400 Original-Received: from c83-254-151-87.bredband.comhem.se ([83.254.151.87]:61147 helo=[127.0.0.1]) by ch-smtp01.sth.basefarm.net with esmtp (Exim 4.68) (envelope-from ) id 1KcqPi-0000TH-3O; Tue, 09 Sep 2008 01:44:58 +0200 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 In-Reply-To: <87abeijlb9.fsf@gmail.com> X-Enigmail-Version: 0.95.7 X-Antivirus: avast! (VPS 080908-0, 2008-09-08), Outbound message X-Antivirus-Status: Clean X-Originating-IP: 83.254.151.87 X-Scan-Result: No virus found in message 1KcqPi-0000TH-3O. X-Scan-Signature: ch-smtp01.sth.basefarm.net 1KcqPi-0000TH-3O 407c2a371007b167ebeb0863f0886412 X-detected-kernel: by monty-python.gnu.org: Linux 2.6? (barebone, rare!) 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:103711 Archived-At: Jay Belanger wrote: >> The original bug report was about this >> >> (calc-eval "1 / 2 * 1000") >> >> Calc treats this as 1 / (2 * 1000) which is just plain wrong. > > That's overstating it. Not if you use the usual precedence rules in math. Then it is plain wrong. No less and no more. If you want to use some other logic then of course it is not wrong. >> I have never seen a mathematician treat it that way - though I have >> seen many pupils doing that. > > While there may be counterexamples, I have never seen a mathematician > write 1 / 2 * 1000 when he means (1 / 2) * 1000. Strange. I think it is common that you know and use the precedence rules. Of course I agree with you that it is good practice to use parenthesis, but that is another thing.