MathGroup Archive 2004

[Date Index] [Thread Index] [Author Index]

Search the Archive

RE: Bug in parsing expression?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg49120] RE: [mg49062] Bug in parsing expression?
  • From: "Wolf, Hartmut" <Hartmut.Wolf at t-systems.com>
  • Date: Fri, 2 Jul 2004 02:01:20 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

>-----Original Message-----
>From: Arturas Acus [mailto:acus at itpa.lt]
To: mathgroup at smc.vnet.net
>Sent: Wednesday, June 30, 2004 11:34 AM
>To: mathgroup at smc.vnet.net
>Subject: [mg49120] [mg49062] Bug in parsing expression?
>
>
>Dear Group,
>
>Just try to evaluate this expression 
>
>1/(5*(-7 + 4*Sqrt[3])^3*(1/2 - 1/(2*(-7 + 4*Sqrt[3])^2))*(((-384 +
>224*Sqrt[3])*(3/2 + 2*Sqrt[3] + 1/(2*(-7 + 4*Sqrt[3]))))/(-1/2 +      
>1/(2*(-7 + 4*Sqrt[3])^2)))^(3/2))
>
>in 5.0. on linux box I receive   $IterationLimit::"itlim" message.
>Is it repeatable?
>
>Sincerely. Arturas Acus
>
>

Certainly not a parsing error, but apparently an infinite loop at simplifying. 

Help Mathematica to avoid this:

In[1]:=
1/(5*(-7 + 4*Sqrt[3])^3*(1/2 - 
          1/(2*(-7 + 4*Sqrt[3])^2))*(((-384 + 224*Sqrt[3])*(3/2 + 2*Sqrt[3] + 
                    1/(2*(-7 + 4*Sqrt[3]))))/(-1/2 + 
                1/(2*(-7 + 4*Sqrt[3])^2)))^(3/2))

>From In[1]:=
$IterationLimit::"itlim": "Iteration limit of 4096 exceeded."

In[2]:= Short[%1 // FullForm, 4]
Out[2]//Short=
Hold[Times[Rational[1, 5], 
    Power[Plus[-7, Times[4, Power[3, Rational[1, 2]]]], -3], 
    Power[\[LeftSkeleton]1\[RightSkeleton]], 
    Power[\[LeftSkeleton]1\[RightSkeleton]]]]


In[4]:=
Replace[%1, 
    Hold[Times[f1_, f2_, f3_, f4_]] :> 
      Times @@ Simplify /@ {f1, f2, f3, f4}] // FullSimplify
Out[4]=
(I*(-12 + 7*Sqrt[3]))/(3840*(7 - 4*Sqrt[3])^6)

In[12]:= %4 // N
Out[12]= 0. + 236.43125000085212*I


--
Hartmut Wolf


  • Prev by Date: Re: Troubles with Integrating certain functions in 5.0
  • Next by Date: RE : Combining two paramteric plots into one.
  • Previous by thread: RE: Bug in parsing expression?
  • Next by thread: Re: printing graphics to a postscript file