From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jay Belanger Newsgroups: gmane.emacs.devel Subject: Re: Calc: `*' binds more strongly than `/' Date: Tue, 17 Apr 2007 13:54:34 -0500 Message-ID: <87abx6u905.fsf@truman.edu> References: <87y7kvxj6p.fsf@arcor.de> <87odlrkn74.fsf@truman.edu> <87tzvhcul9.fsf@stupidchicken.com> <863b2z2mma.fsf@blue.stonehenge.com> Reply-To: belanger@truman.edu NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1176836141 7477 80.91.229.12 (17 Apr 2007 18:55:41 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 17 Apr 2007 18:55:41 +0000 (UTC) Cc: belanger@truman.edu To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Apr 17 20:55:34 2007 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 1Hdspr-00005F-Hq for ged-emacs-devel@m.gmane.org; Tue, 17 Apr 2007 20:55:27 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Hdsub-0004ov-Os for ged-emacs-devel@m.gmane.org; Tue, 17 Apr 2007 15:00:21 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Hdsu8-0004fD-2A for emacs-devel@gnu.org; Tue, 17 Apr 2007 14:59:52 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Hdstx-0004bb-8N for emacs-devel@gnu.org; Tue, 17 Apr 2007 14:59:51 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Hdstx-0004bW-4H for emacs-devel@gnu.org; Tue, 17 Apr 2007 14:59:41 -0400 Original-Received: from uranium.truman.edu ([150.243.160.94]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1HdspB-0007Mp-R9 for emacs-devel@gnu.org; Tue, 17 Apr 2007 14:54:46 -0400 Original-Received: from uranium.truman.edu (localhost.localdomain [127.0.0.1]) by localhost (Postfix) with SMTP id 0498514225 for ; Tue, 17 Apr 2007 13:54:43 -0500 (CDT) Original-Received: from localhost.localdomain.truman.edu (unknown [150.243.64.25]) by uranium.truman.edu (Postfix) with ESMTP id C6E6C5BA29; Tue, 17 Apr 2007 13:54:40 -0500 (CDT) User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.97 (gnu/linux) X-detected-kernel: Linux 2.6, seldom 2.4 (older, 4) 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:69533 Archived-At: merlyn@stonehenge.com (Randal L. Schwartz) writes: >>>>>> "Stefan" == Stefan Monnier writes: > Stefan> After Emacs-22, we should probably just change the precedence to be the > Stefan> "normal" one. > > No, not normal for mathemeticians (and me on a bad day), who expect A*B/C*D to > be the same as (A*B)/(C*D). Really? If I saw A*B/C*D, the main thing I'd be thinking is "Gee, I wish parentheses were put in." > I suggest it not be changed. It will break old code (Calc has been around for > almost two decades), it's a minor thing, and people have eventually stumbled > on it, and it's well (over?) documented. Is there any old code that relies on the current order of operations? I just tried out 2*3/4*5 on a TI-86 and HP48; they both gave me 7.5. I don't have a TI myself, so I used a student's. There were several grad students around, most of whom will eventually teach high school. When I asked them what "2*3/4*5" should mean, I had a hard time getting an answer. They kept saying "You're missing parentheses" or "what are you trying to write?"; when I finally asked how they would interpret it if they saw it on a paper, one student said "I'd write 'minus one, bad notation'". I think she's right. Traditionally, I think * and / are supposed to have identical precedence, and when mixed should be performed left to right. But I think writing A*B/C*D when you mean A*(B/C)*D is poor notation. I also think writing A*B/C*D when you mean (A*B)/(C*D) is poor notation, but a couple of people have said that it's a convenient shortcut that saves the trouble of typing in parentheses. So perhaps there's something to be said for the current behavior. Jay