GNU bug report logs - #918
In CVS Emacs, calc-eval gives multiplication higher precidence than division

Previous Next

Package: emacs;

Reported by: Francis Litterio <flitterio <at> gmail.com>

Date: Sun, 7 Sep 2008 18:30:03 UTC

Severity: normal

Merged with 914, 915, 920, 921, 923, 924, 928, 929, 930, 932, 933, 934, 937, 941, 944

Done: Chong Yidong <cyd <at> stupidchicken.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Francis Litterio <flitterio <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Cc: emacs-devel <at> gnu.org
Subject: bug#918: In CVS Emacs, calc-eval gives multiplication higher precidence than division
Date: Sun, 07 Sep 2008 14:15:35 -0400
Jay Belanger wrote:

> Francis Litterio 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

Thanks, Jay.

My apologies for rehashing old news.  I just discovered the discussion
thread at:

	http://thread.gmane.org/gmane.emacs.devel/69436
--
Fran






This bug report was last modified 16 years and 277 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.