From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: In CVS Emacs, calc-eval gives multiplication higher precidence than division Date: Sun, 07 Sep 2008 17:10:05 -0400 Message-ID: References: <878wu3j4k2.fsf@gmail.com> <86wshn3df0.fsf@blue.stonehenge.com> <48C43ADA.1070001@gmail.com> <86sksb3d53.fsf@blue.stonehenge.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1220821881 31644 80.91.229.12 (7 Sep 2008 21:11:21 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 7 Sep 2008 21:11:21 +0000 (UTC) Cc: "Lennart Borgman \(gmail\)" , emacs-devel@gnu.org To: merlyn@stonehenge.com (Randal L. Schwartz) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Sep 07 23:12:16 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 1KcRYH-0004vY-ML for ged-emacs-devel@m.gmane.org; Sun, 07 Sep 2008 23:12:09 +0200 Original-Received: from localhost ([127.0.0.1]:33873 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KcRXI-0002Hy-0B for ged-emacs-devel@m.gmane.org; Sun, 07 Sep 2008 17:11:08 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KcRWS-0001Qa-K1 for emacs-devel@gnu.org; Sun, 07 Sep 2008 17:10:16 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KcRWR-0001On-PL for emacs-devel@gnu.org; Sun, 07 Sep 2008 17:10:16 -0400 Original-Received: from [199.232.76.173] (port=37932 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KcRWR-0001Oe-Mk for emacs-devel@gnu.org; Sun, 07 Sep 2008 17:10:15 -0400 Original-Received: from ironport2-out.pppoe.ca ([206.248.154.182]:45001 helo=ironport2-out.teksavvy.com) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KcRWR-0007Lx-4d for emacs-devel@gnu.org; Sun, 07 Sep 2008 17:10:15 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AiQFAAfgw0hFxIqP/2dsb2JhbACBZbATgWaBBw X-IronPort-AV: E=Sophos;i="4.32,353,1217822400"; d="scan'208";a="26488042" Original-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 17:10:06 -0400 Original-Received: by ceviche.home (Postfix, from userid 20848) id 7E797B4069; Sun, 7 Sep 2008 17:10:05 -0400 (EDT) In-Reply-To: <86sksb3d53.fsf@blue.stonehenge.com> (Randal L. Schwartz's message of "Sun, 07 Sep 2008 13:38:16 -0700") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-detected-kernel: by monty-python.gnu.org: Genre and OS details not recognized. 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:103654 Archived-At: > You parse > a b / c d > as ((a * b) / c) * d ? "a b / c d" is completely different from "a * b / c * d" w.r.t. precedence. And so is "a * b =F7 c * d" or "a =D7 b =F7 c =D7 d". There's no good reason why they necessarily all three get parsed identically. As it so happens, Calc is the only tool I know which parses "a * b / c * d" differently than "((a * b) / c) * d". So whether it makes sense or not doesn't really matter, because the other way to parse it also makes sense and has the benefit of agreeing with the world out there. Stefan