all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Andreas Schwab <schwab@linux-m68k.org>
To: 37235@debbugs.gnu.org
Cc: charles.karney@sri.com
Subject: bug#37235: 26.1; Precedence error in calc-eval
Date: Fri, 30 Aug 2019 17:07:08 +0200	[thread overview]
Message-ID: <87ef124rqb.fsf@igel.home> (raw)
In-Reply-To: <857abb8d-8da0-82b2-d50d-01d57b4be681@sri.com> (Charles Karney via's message of "Fri, 30 Aug 2019 13:41:32 +0000")

On Aug 30 2019, Charles Karney via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org> 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."





      parent reply	other threads:[~2019-08-30 15:07 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-30 13:41 bug#37235: 26.1; Precedence error in calc-eval Charles Karney via Bug reports for GNU Emacs, the Swiss army knife of text editors
2019-08-30 15:04 ` Mauro Aranda
2019-08-30 15:26   ` Noam Postavsky
2019-09-16  3:06   ` Stefan Kangas
2019-08-30 15:07 ` Andreas Schwab [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ef124rqb.fsf@igel.home \
    --to=schwab@linux-m68k.org \
    --cc=37235@debbugs.gnu.org \
    --cc=charles.karney@sri.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.