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 15:35:37 -0500 Message-ID: <873akbitie.fsf@gmail.com> References: <878wu3j4k2.fsf@gmail.com> 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 1220819774 26123 80.91.229.12 (7 Sep 2008 20:36:14 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 7 Sep 2008 20:36:14 +0000 (UTC) Cc: jay.p.belanger@gmail.com, bug-gnu-emacs@gnu.org, Francis Litterio , emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Sep 07 22:37:09 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 1KcR0J-0006My-57 for ged-emacs-devel@m.gmane.org; Sun, 07 Sep 2008 22:37:03 +0200 Original-Received: from localhost ([127.0.0.1]:52480 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KcQzJ-00046g-Ga for ged-emacs-devel@m.gmane.org; Sun, 07 Sep 2008 16:36:01 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KcQzF-00046B-3T for emacs-devel@gnu.org; Sun, 07 Sep 2008 16:35:57 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KcQzE-00045o-Gk for emacs-devel@gnu.org; Sun, 07 Sep 2008 16:35:56 -0400 Original-Received: from [199.232.76.173] (port=42571 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KcQzC-00044q-E5; Sun, 07 Sep 2008 16:35:54 -0400 Original-Received: from s1.cableone.net ([24.116.0.227]:46730) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KcQzB-0002p9-CN; Sun, 07 Sep 2008 16:35:54 -0400 Original-Received: from belanger (unverified [69.92.109.217]) by s1.cableone.net (CableOne SMTP Service s1) with ESMTP id 5352024-1872270 for multiple; Sun, 07 Sep 2008 13:35:39 -0700 In-Reply-To: (Stefan Monnier's message of "Sun, 07 Sep 2008 15:46:52 -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 67, in=24, 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:103648 gmane.emacs.bugs:20314 Archived-At: >> That's not a bug. While many systems give division a higher precendence >> than multiplication, that isn't a universal rule. > > Actually, I don't know of any system that gives higher precedence to > division. 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. > The general rule that (AFAIK) all programming languages > follow (other than those that don't use infix-with-precedence, such as > Lisp and Smalltalk) is that * and / have the same precedence (and are > left associative). That behavior is available, but you have to ask for it by setting `calc-multiplication-has-precedence' to nil.