Re: Overriding Power
- To: mathgroup at smc.vnet.net
- Subject: [mg26869] Re: [mg26808] Overriding Power
- From: Jeff Hersh <frumple*NOSPAM* at home.com>
- Date: Fri, 26 Jan 2001 01:27:18 -0500 (EST)
- References: <200101240918.EAA03605@smc.vnet.net> <email@example.com>
- Sender: owner-wri-mathgroup at wolfram.com
In article <94ohvc$efs at smc.vnet.net>, Daniel Lichtblau
<danl at wolfram.com> wrote:
> Jeff Hersh wrote:
> > Hello,
> > I am working on a package that deals with non-communative multiplication
> > and I have run into a problem with the Power function. As we know
> > Power[a b,n] (where n is an integer) automatically gets converted to
> > Power[a,n] Power[b,n]. However, with non-communative multiplication (I
> > have removed the Orderless attribute from Times to make it
> > non-communative) this isn't valid. Is there any way I can stop
> > Mathematica from automatically doing this conversion?
> > Jeff
> > --
> > Jeffrey Hersh,PhD
> > Remove the *NOSPAM* to reply.
> > <insert amusing quote here>
> This is a known bug (I reported it in-house around four years ago).
> In:= (a*b)^3
> 3 3
> Out= a b
> In some ways I am happy to see this bug remain alive. The reason is
> that, while it is well and good for us to pretend that ordered Times is
> fully supported, in actual fact this is essentially impossible to do.
> Changing attributes of low-level arithmetic functions is problematic,
> and the better we appear to support it, the more likely are users to
> encounter really unobvious problems.
> We generally advocate using e.g. NonCommutativeMultiply with rules
> attached to support scalar multiplication, powers, commutators, and
> whatever else is required for your particular needs.
> Daniel Lichtblau
> Wolfram Research
In that case is there a way, either by the Notation utility or some
other means, to remove white space as Times and make it
NonCommunativeMultiply? In other words I want a b =
NonCommunitiveMultiply[a,b] not Times[a,b].
FYI, so far I have just removed the attribute Orderless from Times and
it works fine except in the case of powers.
Remove the *NOSPAM* to reply.
<insert amusing quote here>
Prev by Date:
Re: Fw: FORTRAN style, not OK?
Next by Date:
Previous by thread:
Re: Overriding Power
Next by thread:
Re: Re: Overriding Power