unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Neon Absentius <absent@sdf.lonestar.org>
Subject: Re: Bug in Calc?
Date: Wed, 7 Sep 2005 11:42:44 +0000	[thread overview]
Message-ID: <20050907114244.GC28822@SDF.LONESTAR.ORG> (raw)
In-Reply-To: <20050906213348.GE12694@SDF.LONESTAR.ORG>

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	other threads:[~2005-09-07 11:42 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.6004.1125975207.20277.help-gnu-emacs@gnu.org>
2005-09-06 14:09 ` Non-commutative symbolic multiplication in Calc Roland Winkler
2005-09-06 17:07   ` Neon Absentius
     [not found]   ` <mailman.6076.1126026835.20277.help-gnu-emacs@gnu.org>
2005-09-06 18:36     ` Roland Winkler
2005-09-06 19:12       ` Neon Absentius
2005-09-06 20:03 ` Jay Belanger
2005-09-06 21:33   ` Bug in Calc? (was Re: Non-commutative symbolic multiplication in Calc) Neon Absentius
2005-09-07 11:42     ` Neon Absentius [this message]
     [not found]     ` <mailman.6172.1126094602.20277.help-gnu-emacs@gnu.org>
2005-09-07 13:56       ` Bug in Calc? Jay Belanger
     [not found]   ` <mailman.6115.1126042963.20277.help-gnu-emacs@gnu.org>
2005-09-07 19:36     ` Bug in Calc? (was Re: Non-commutative symbolic multiplication in Calc) Jay Belanger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050907114244.GC28822@SDF.LONESTAR.ORG \
    --to=absent@sdf.lonestar.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).