bug-gnu-emacs
[Top][All Lists]
Advanced

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

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


From: Stefan Kangas
Subject: bug#37235: 26.1; Precedence error in calc-eval
Date: Mon, 16 Sep 2019 05:06:07 +0200

Mauro Aranda <maurooaranda@gmail.com> writes:
>
> tags 37235 notabug
> quit
>
> Charles Karney via "Bug reports for GNU Emacs, the Swiss army knife of
> text editors" <bug-gnu-emacs@gnu.org> writes:
>
> > In GNU Emacs 26.1 (build 1, x86_64-redhat-linux-gnu, GTK+ Version 3.23.2)
> >   of 2018-08-13 built on buildvm-13.phx2.fedoraproject.org
> > Windowing system distributor 'Fedora Project', version 11.0.12004000
> > System Description: Fedora release 29 (Twenty Nine)
> >
> > 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.
>
> 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

Since this is notabug, I'm also closing it.

Best regards,
Stefan Kangas





reply via email to

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