emacs-devel
[Top][All Lists]
Advanced

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

Re: In CVS Emacs, calc-eval gives multiplication higher precidence than


From: Jay Belanger
Subject: Re: In CVS Emacs, calc-eval gives multiplication higher precidence than division
Date: Sun, 07 Sep 2008 11:37:01 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)

Francis Litterio <address@hidden> writes:
...
> In CVS Emacs, function calc-eval (in lisp/calc/calc.el) gives
> multiplication higher precidence than division.

That's not a bug.  While many systems give division a higher precendence
than multiplication, that isn't a universal rule.  Calc has always given
multiplication a higher precendence, and something like
1 / 2 * 1000
can be viewed as shorthand for
   1
--------
2 * 1000
Some people don't like this, some people do, but this choice is
established Calc behavior and is highlighted in the manual.  To divide
first, it's probably better style regardless to put in the parentheses:
(1 / 2) * 1000

Jay




reply via email to

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