Subject: bug#37235: 26.1; Precedence error in calc-eval

From: Andreas Schwab <[email-masked]>
Date: Fri, 30 Aug 2019 17:07:08 +0200

On Aug 30 2019, Charles Karney via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <[email-masked]> 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, [email-masked]
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."