[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

From: Andreas Schwab
Subject: bug#37235: 26.1; Precedence error in calc-eval
Date: Fri, 30 Aug 2019 17:07:08 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux)

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


Andreas Schwab, address@hidden
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."

reply via email to

[Prev in Thread] Current Thread [Next in Thread]