From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Andreas Schwab Newsgroups: gmane.emacs.bugs Subject: bug#37235: 26.1; Precedence error in calc-eval Date: Fri, 30 Aug 2019 17:07:08 +0200 Message-ID: <87ef124rqb.fsf@igel.home> References: <857abb8d-8da0-82b2-d50d-01d57b4be681@sri.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="39604"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) Cc: charles.karney@sri.com To: 37235@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Aug 30 17:10:42 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1i3iXx-000ADa-TS for geb-bug-gnu-emacs@m.gmane.org; Fri, 30 Aug 2019 17:10:42 +0200 Original-Received: from localhost ([::1]:33550 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i3iXv-0007Ws-AL for geb-bug-gnu-emacs@m.gmane.org; Fri, 30 Aug 2019 11:10:39 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44666) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i3iVT-0006sT-HF for bug-gnu-emacs@gnu.org; Fri, 30 Aug 2019 11:08:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i3iVP-0003zc-A6 for bug-gnu-emacs@gnu.org; Fri, 30 Aug 2019 11:08:06 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:45918) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1i3iVO-0003ug-Vh for bug-gnu-emacs@gnu.org; Fri, 30 Aug 2019 11:08:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1i3iVN-0004vX-Pn for bug-gnu-emacs@gnu.org; Fri, 30 Aug 2019 11:08:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Andreas Schwab Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 30 Aug 2019 15:08:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 37235 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: notabug X-Debbugs-Original-To: Charles Karney via "Bug reports for GNU Emacs\, the Swiss army knife of text editors" X-Debbugs-Original-Cc: 37235@debbugs.gnu.org, Charles Karney Original-Received: via spool by submit@debbugs.gnu.org id=B.156717764218893 (code B ref -1); Fri, 30 Aug 2019 15:08:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 30 Aug 2019 15:07:22 +0000 Original-Received: from localhost ([127.0.0.1]:54739 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i3iUk-0004ue-IC for submit@debbugs.gnu.org; Fri, 30 Aug 2019 11:07:22 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:58754) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i3iUg-0004uV-L6 for submit@debbugs.gnu.org; Fri, 30 Aug 2019 11:07:18 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:42411) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i3iUf-0006Pj-GC for bug-gnu-emacs@gnu.org; Fri, 30 Aug 2019 11:07:18 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i3iUb-0001Bs-9B for bug-gnu-emacs@gnu.org; Fri, 30 Aug 2019 11:07:14 -0400 Original-Received: from mail-out.m-online.net ([212.18.0.9]:42909) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1i3iUa-0000zg-Vv for bug-gnu-emacs@gnu.org; Fri, 30 Aug 2019 11:07:13 -0400 Original-Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 46KjWL0969z1rFDl; Fri, 30 Aug 2019 17:07:09 +0200 (CEST) Original-Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 46KjWK5fd9z1qqkD; Fri, 30 Aug 2019 17:07:09 +0200 (CEST) X-Virus-Scanned: amavisd-new at mnet-online.de Original-Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id 7dVIa9imhqWT; Fri, 30 Aug 2019 17:07:09 +0200 (CEST) X-Auth-Info: cezJvu4CjP3RwPBDy9bxae6+VuJVP7GJVVY/o0QNYMjnWM9Gl2Zv6IMYgr8IKoWC Original-Received: from igel.home (ppp-46-244-185-201.dynamic.mnet-online.de [46.244.185.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Fri, 30 Aug 2019 17:07:09 +0200 (CEST) Original-Received: by igel.home (Postfix, from userid 1000) id 44A032C011C; Fri, 30 Aug 2019 17:07:08 +0200 (CEST) X-Yow: An INK-LING? Sure -- TAKE one!! Did you BUY any COMMUNIST UNIFORMS?? In-Reply-To: <857abb8d-8da0-82b2-d50d-01d57b4be681@sri.com> (Charles Karney via's message of "Fri, 30 Aug 2019 13:41:32 +0000") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:166098 Archived-At: On Aug 30 2019, Charles Karney via "Bug reports for GNU Emacs, the Swiss army knife of text editors" wrote: > The precedence of calc-eval doesn't follow C-like rules. > > (calc-eval "1/2*3") returns "0.166666666667" > > returning the same answer as (calc-eval "1/2/3"). It should return > "1.5". It is documented that multiplication has higher precedence than devision (see (calc) Formulas). Calc is following the rules of Algebra. Andreas. -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1 "And now for something completely different."