MathGroup Archive 1999

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

Search the Archive

Re: Strange ReplaceRepeated

  • To: mathgroup at smc.vnet.net
  • Subject: [mg17081] Re: Strange ReplaceRepeated
  • From: tobiasoed at my-dejanews.com
  • Date: Sat, 17 Apr 1999 03:34:52 -0400
  • Organization: Deja News - The Leader in Internet Discussion
  • Sender: owner-wri-mathgroup at wolfram.com

Arturas Acus wrote:
>
> Dear Group,
>
> Here are very strange rezults from
> RplaceRepeated.
>
> Input:
>
> tarp=List[
>     List[AuxVertex[List[List[i2],m2]],
>       CG[List[i1,m1],List[i2,m2],List[i3,F[m3]]],
>       WD[i1,List[List[m1],List[m2]],List[q0]]],
>     List[AuxVertex[List[List[i1],m1]],
>       CG[List[i1,m1],List[i2,m2],List[i3,F[m3]]],
>       WD[i1,List[List[m1],List[m2]],List[q0]]]]
> Now try this on Linux box:
>
> tarp//.{F[_]:>S[Infinity],_?NumberQ:>S[Infinity]}
>
> It rezults in infinite loop. Using TracePrint indicates, that
> somewhere integer "1" appears for which NumberQ gives True. But there
> isn't '1' at all in tarp! What is happening here?
>
>
> Arturas Acus
> Institute of Theoretical
> Physics and Astronomy
> Gostauto 12, 2600,Vilnius
> Lithuania
>
> E-mail: acus at itpa.lt
>    Fax: 370-2-225361
>    Tel: 370-2-612906

Arturas,
        FullForm[Infinity] is DirectedInfinity[1]. That's where
you get the ones from. Either use a Replace or if you need
the ReplaceRepeated, try

tarp//.{F[_]:>S[Inf],_?NumberQ:>S[Inf]} /. Inf->Infinity

Tobias

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    


  • Prev by Date: Re: ParametricPlot help please
  • Next by Date: Journals about Mathematica
  • Previous by thread: Re: Strange ReplaceRepeated
  • Next by thread: Re: Strange ReplaceRepeated