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 tha


From: Stefan Monnier
Subject: Re: In CVS Emacs, calc-eval gives multiplication higher precidence than division
Date: Sun, 07 Sep 2008 17:10:05 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)

> You parse
>     a b / c d
> as ((a * b) / c) * d ?

"a b / c d" is completely different from "a * b / c * d"
w.r.t. precedence.  And so is "a * b ÷ c * d" or "a × b ÷ c × d".
There's no good reason why they necessarily all three get
parsed identically.

As it so happens, Calc is the only tool I know which parses
"a * b / c * d" differently than "((a * b) / c) * d".  So whether it
makes sense or not doesn't really matter, because the other way to parse
it also makes sense and has the benefit of agreeing with the world
out there.


        Stefan




reply via email to

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