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

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

bug#921: In CVS Emacs, calc-eval gives multiplication higher precidence


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

>> That's not a bug.  While many systems give division a higher precendence
>> than multiplication, that isn't a universal rule.
>
> Actually, I don't know of any system that gives higher precedence to
> division.

According to Wikipedia:
  An expression like 1/2x is interpreted as 1/(2x) by TI-82, but as
  (1/2)x by TI-83. While the first interpretation may be expected by
  some users, only the latter is in agreement with the standard rules
  stated above. 

> The general rule that (AFAIK) all programming languages
> follow (other than those that don't use infix-with-precedence, such as
> Lisp and Smalltalk) is that * and / have the same precedence (and are
> left associative).

That behavior is available, but you have to ask for it by setting
`calc-multiplication-has-precedence' to nil.








reply via email to

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