MathGroup Archive 2005

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

Search the Archive

Re: Replacement Rule


No. After your first iteration the output contains only Log (i.e., no instances of 
logo) so the second iteration makes no changes and stops.

logo[a b c d]//.{logo[x_ y_]:>Log[x]+logo[y],logo[x_]:>Log[x]}

log(a)+log(b)+log(c)+log(d)

It appears that you want

Log[a b c d]//PowerExpand

log(a)+log(b)+log(c)+log(d)


Bob Hanlon

> 
> From: "Amir" <z64043 at netscape.net>
To: mathgroup at smc.vnet.net
> Date: 2005/09/22 Thu AM 02:08:02 EDT
> Subject: [mg60642] [mg60605] Replacement Rule
> 
> In:    logo[a b c d] //. logo[x_ y_] :> Log[x]+Log[y]
> Out:  Log[a]+Log[b c d]
> 
> Shouldn't the correct answer be( Log[a]+Log[b]+Log[c]+Log[d]) ????
> 
> Amir 
> 
> 
> 


  • Prev by Date: Re: Bugs in Mathematica 5+
  • Next by Date: Re: Bug in MiniMaxApproximation
  • Previous by thread: Re: Replacement Rule
  • Next by thread: Bug in MiniMaxApproximation