[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: In CVS Emacs, calc-eval gives multiplication higher precidence than
From: |
Lennart Borgman (gmail) |
Subject: |
Re: In CVS Emacs, calc-eval gives multiplication higher precidence than division |
Date: |
Mon, 08 Sep 2008 09:26:59 +0200 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.9) Gecko/20071031 Thunderbird/2.0.0.9 Mnenhy/0.7.5.666 |
Randal L. Schwartz wrote:
> That's crazy.
>
> That's (2b)/(5d), according to any math teacher I knew from school.
>
> That's the only sane parsing of that.
>
> Now, replace 2 with "a" and 5 with "c", and you get:
>
> ab/cd
>
> which is (ab)/(cd).
>
> That's what I mean. This is the *mathematical* evaluation. In this case,
> division *is* lower precedence than multiplication.
I am afraid I think you misunderstand this issue. We are talking about
a * b / c * d
But thanks, maybe I can understand a bit better why some people believe
that these precedence rules exists now. Indeed, as you pointed out "2b"
is often interpreted as "2 * b" and that might give the impression that
there is a precedence rule for * and / that says * has higher precedence.
But there is no such rule. It is about different notations instead.
You have to be more careful when translating notations. The notation
translation is rather
2b / 5d => (2 * b) / (5 * d)
- Re: In CVS Emacs, calc-eval gives multiplication higher precidence than division, (continued)
- Re: In CVS Emacs, calc-eval gives multiplication higher precidence than division, Stefan Monnier, 2008/09/07
- Re: In CVS Emacs, calc-eval gives multiplication higher precidence than division, Jay Belanger, 2008/09/07
- Re: In CVS Emacs, calc-eval gives multiplication higher precidence than division, Jason Rumney, 2008/09/07
- Re: In CVS Emacs, calc-eval gives multiplication higher precidence than division, Randal L. Schwartz, 2008/09/07
- Re: In CVS Emacs, calc-eval gives multiplication higher precidence than division, Stefan Monnier, 2008/09/07
- Re: In CVS Emacs, calc-eval gives multiplication higher precidence than division, Miles Bader, 2008/09/08
- Re: In CVS Emacs, calc-eval gives multiplication higher precidence than division, Stefan Monnier, 2008/09/08
- Re: In CVS Emacs, calc-eval gives multiplication higher precidence than division, martin rudalics, 2008/09/08
- Re: In CVS Emacs, calc-eval gives multiplication higher precidence than division,
Lennart Borgman (gmail) <=
- Re: In CVS Emacs, calc-eval gives multiplication higher precidence than division, Stefan Monnier, 2008/09/07
- Re: In CVS Emacs, calc-eval gives multiplication higher precidence than division, Carsten Dominik, 2008/09/08
- Re: In CVS Emacs, calc-eval gives multiplication higher precidence than division, Lennart Borgman, 2008/09/08
- Re: In CVS Emacs, calc-eval gives multiplication higher precidence than division, Carsten Dominik, 2008/09/08
- Re: In CVS Emacs, calc-eval gives multiplication higher precidence than division, Lennart Borgman (gmail), 2008/09/08
- Re: In CVS Emacs, calc-eval gives multiplication higher precidence than division, Randal L. Schwartz, 2008/09/08
- Re: In CVS Emacs, calc-eval gives multiplication higher precidence than division, Lennart Borgman (gmail), 2008/09/08
- Re: bug#914: In CVS Emacs, calc-eval gives multiplication higher precidence than division, Jay Belanger, 2008/09/08
- Re: bug#914: In CVS Emacs, calc-eval gives multiplication higher precidence than division, Lennart Borgman (gmail), 2008/09/08
- Re: bug#914: In CVS Emacs, calc-eval gives multiplication higher precidence than division, Stefan Monnier, 2008/09/09