Re: Undiscovered Bug?

• To: mathgroup at smc.vnet.net
• Subject: [mg46881] Re: Undiscovered Bug?
• From: Roland Franzius <roland.franzius at uos.de>
• Date: Fri, 12 Mar 2004 23:39:29 -0500 (EST)
• Organization: Universitaet Hannover
• References: <c2rnrf\$p4h\$1@smc.vnet.net>
• Sender: owner-wri-mathgroup at wolfram.com

```Harold Noffke wrote:
> MathGroup:
>
> In Mathematica 5.0.1 with Windows 2000, I mistakenly used the [[{}]]
> operator on x/y.  I was expecting an error, but I kept getting unusual
> results as shown in In/Out's 2 to 5 below.
>
> Have I stumbled on a bug, or is there a way to make sense out of this?
>
>
> In[1]:= TreeForm[x/y]
>
> Out[1]//TreeForm= Times[x, |           ]
>                            Power[y, -1]
>
> In[2]:= (x/y)[[{2,2}]]
>
>
> Out[2]=  -2
>         y
>
> In[3]:= (x/y)[[{1,2,1}]]
>
>          2
>         x
> Out[3]= --
>         y
>
> In[4]:= (x/y)[[{2, 2, 2, 2}]]
>
>          -4
> Out[4]= y
>
> In[5]:= (x/y)[[{2, 1, 1, 0, 2, 2, 0}]]
>
>              2  2
>         Times  x
> Out[5]= ---------
>             3
>            y

Using ??, Help or F1 you will find the explanation

"expr[[ {i1, i2, ... } ]] gives a list of the parts i1, i2, ...  of expr."

--

Roland Franzius

```

• Prev by Date: Re: Creating a symmetric matrix
• Next by Date: FactorIntegerECM repeated or parallel runs question
• Previous by thread: Re: Undiscovered Bug?
• Next by thread: RE: Undiscovered Bug?