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

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

Re: Bug in Calc?


From: Neon Absentius
Subject: Re: Bug in Calc?
Date: Wed, 7 Sep 2005 11:42:44 +0000
User-agent: Mutt/1.4.2.1i

On Tue, Sep 06, 2005 at 09:33:48PM +0000, Neon Absentius wrote:

> there seems to be a bug: After I give 'm v' if I ask calc to
> simplify the expression 'a b - b a' it leaves it as is which is as 
> expected. However when I ask it to expand '(a+b)^2' it returns 
> 'a^2 + 2 b a + b^2' which is of course wrong if a and b don't commute. 
> This happens both with emacs-multi-tty (22.0.50) and whith emacs
> 21.4.1 on a Debian testing/unstable. The bug manifsts itself also
> for the expansion of '(a+b)^3' however calc expands '(x+y)(x-y)'
> into 'x^2 + y x  -  x y + y^2'. Strange!

Maybe not so strange.  Probably calc uses formulae (the binomial
expansion?)  to expand the power instead of fully distributing the
multiplication over the addtition "by hand", so to speak.  Of course
the binomial expansion is not valid if the variables involved do not
commute.
 
I am not sure how to check if this is indeed the reason for the bug.

-- 
Most precious among the relics remaining of Peter's skeleton in the
Vatican are 29 fragments of one of his skulls. (St. Peter's other
skull is preserved in a reliquary at the Cathedral of St. John
Lateran.)
   -- Frank R. Zindler, "Of Bones and Boners"




reply via email to

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