Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2005
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2005

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

Search the Archive

Re: Replacement Rule

  • To: mathgroup at smc.vnet.net
  • Subject: [mg60629] Re: [mg60605] Replacement Rule
  • From: "Jaccard Florian" <Florian.Jaccard at he-arc.ch>
  • Date: Thu, 22 Sep 2005 05:42:16 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

Hello Amir!

You just made a little typing mistake!
On the right hand side of your rule, you have to find logo to!

In[3]:=
logo[a*b*c*d] //. logo[(x_)*(y_)] :> logo[x] + logo[y]

Out[3]=
logo[a] + logo[b] + logo[c] + logo[d]

Regards
 
F.Jaccard

-----Message d'origine-----
De : Amir [mailto:z64043 at netscape.net] 
Envoyé : jeudi, 22. septembre 2005 08:08
À : mathgroup at smc.vnet.net
Objet : [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: A Su Doku solver
  • Next by Date: Re: Replacement Rule
  • Previous by thread: Re: Replacement Rule
  • Next by thread: Re: Replacement Rule