From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Noam Postavsky Newsgroups: gmane.emacs.bugs Subject: bug#37235: 26.1; Precedence error in calc-eval Date: Fri, 30 Aug 2019 11:26:57 -0400 Message-ID: <85r252ishq.fsf@gmail.com> 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="128058"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1.92 (windows-nt) Cc: Charles Karney , 37235@debbugs.gnu.org To: Mauro Aranda Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Aug 30 17:31:26 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 1i3irz-000X7e-7d for geb-bug-gnu-emacs@m.gmane.org; Fri, 30 Aug 2019 17:31:23 +0200 Original-Received: from localhost ([::1]:33776 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i3iry-00057a-6P for geb-bug-gnu-emacs@m.gmane.org; Fri, 30 Aug 2019 11:31:22 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:34939) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i3ioo-0004FZ-Lr for bug-gnu-emacs@gnu.org; Fri, 30 Aug 2019 11:28:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i3iol-0001w1-L4 for bug-gnu-emacs@gnu.org; Fri, 30 Aug 2019 11:28:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:45932) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1i3iol-0001vN-GR for bug-gnu-emacs@gnu.org; Fri, 30 Aug 2019 11:28:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1i3iok-0007Ux-Ak for bug-gnu-emacs@gnu.org; Fri, 30 Aug 2019 11:28:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Noam Postavsky Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 30 Aug 2019 15:28:02 +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 Original-Received: via spool by 37235-submit@debbugs.gnu.org id=B37235.156717882528749 (code B ref 37235); Fri, 30 Aug 2019 15:28:02 +0000 Original-Received: (at 37235) by debbugs.gnu.org; 30 Aug 2019 15:27:05 +0000 Original-Received: from localhost ([127.0.0.1]:54753 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i3ino-0007Tc-VU for submit@debbugs.gnu.org; Fri, 30 Aug 2019 11:27:05 -0400 Original-Received: from mail-io1-f48.google.com ([209.85.166.48]:45247) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i3inn-0007T8-0b for 37235@debbugs.gnu.org; Fri, 30 Aug 2019 11:27:03 -0400 Original-Received: by mail-io1-f48.google.com with SMTP id t3so14696855ioj.12 for <37235@debbugs.gnu.org>; Fri, 30 Aug 2019 08:27:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=6Yp0znpKuzGTv/KHYJAbBGkckC9GG2O4qbaobNhMQkQ=; b=ldZHxZjc2RgE/UAuIqT0JRyqQEzPxHn/1kO2ld9ZPhWW7hBy1LRfZbjseIhZycFUNO eQuIezL3zKR5TrVFdmvlFwXXk2It9gk1UbJP2gaB2O8ZnRI0CAhwsQ7Z05qzmpZP4M3P SJfL3yagayY6OIojR5Q+ufrLqCDlmSaRnepn2Ic4nYrWY4QYaXHBAuTJ3PAmd4FqrpXj POekatxqjzINIUT6K+Tgzmyn2GLJqyFjik4bbwpQczVknZrL75ilp8CpgCt+Sl9hk1GJ 0yiX4G1NgY82Tmw7W0P40yAfN8baXBRuUtQHo6MhiTeyDSv07KdZhuvBM+cqyCft6cBB PLuA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=6Yp0znpKuzGTv/KHYJAbBGkckC9GG2O4qbaobNhMQkQ=; b=Xn3qfzuPlw8H3diEoWpAvzRhYBq8xhMco+UBq7cdHUajsdqM7jaStnfGpalBprIJ55 oaByKBeD2i+AI+bGhsvs8neX8jiWQe4t34ift3T6qGGKNnNoqkkqlRSKjMsizWAhxaIn 17Js/8IyqGPykmmNZRYdNfekxX2sohAKLPfJtcOiZBFUlFBzvh4n7Ut6KWbpA+m3oQYf F8bwFtvhQfizk51JUp/WwZ7gvEO7NIjE8Hy/LnQmXwXUBmnvF8+f9TSP6GrfK/hsg8Qp EjzOEIVa7NPtPZbhk4fG0k+4kHZArBXQRi01ZGSqsCddPBbUAVEk5Gqb3Vd3mE/Qy3VO 8Zsg== X-Gm-Message-State: APjAAAWvJR8UfySEk9KHptzn0IFT+rOOFDAurV0FH9rExzKf5SKUoORV tBX2tvd4tca43nhx8TDy1oqZ0JCm X-Google-Smtp-Source: APXvYqxe43lk/WxWfNeaCZHeP/3C9ewxOZL0HAQ2oW18bbkTr029RGinVw2eDBuZJCSzdkD+PeBNCA== X-Received: by 2002:a6b:8e0f:: with SMTP id q15mr1938723iod.186.1567178817272; Fri, 30 Aug 2019 08:26:57 -0700 (PDT) Original-Received: from vhost2 (CPE001143542e1f-CMf81d0f809fa0.cpe.net.cable.rogers.com. [99.230.38.42]) by smtp.gmail.com with ESMTPSA id t5sm5119939ios.33.2019.08.30.08.26.56 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 30 Aug 2019 08:26:56 -0700 (PDT) In-Reply-To: (Mauro Aranda's message of "Fri, 30 Aug 2019 12:04:35 -0300") 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:166100 Archived-At: Mauro Aranda writes: >> >> 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 works as documented in the Calc manual, section 5.15 Formulas: > C-h i m calc RET 5 m formulas RET > > Calc gives '/' lower precedence than '*' by default. Also see (info "(calc) Basic Arithmetic"), > To make Calc follow C-like rules, you can set it with the command > calc-c-language. You can read its documentation with: > C-h i m calc RET i calc-c-language which mentions calc-multiplication-has-precedence.