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: ReplaceAll / sequential replacements versus joint replacement

  • To: mathgroup at smc.vnet.net
  • Subject: [mg55452] Re: [mg55429] ReplaceAll / sequential replacements versus joint replacement
  • From: "Wolf, Hartmut" <Hartmut.Wolf at t-systems.com>
  • Date: Thu, 24 Mar 2005 03:41:51 -0500 (EST)
  • Sender: owner-wri-mathgroup at wolfram.com

 

>-----Original Message-----
>From: Ronald Wendner [mailto:Ronald.Wendner at uni-graz.at] 
To: mathgroup at smc.vnet.net
>Sent: Wednesday, March 23, 2005 11:35 AM
>Subject: [mg55452] [mg55429] ReplaceAll / sequential replacements versus 
>joint replacement
>
>Suppose there is an expression e1 which depends, among others, 
>on variables 
>a and b.
>Replace both a and b by zero:
>
>e1/.{a->0,b->0} Mathematica gives, say, result1.
>
>Next, consider
>
>e2 = e1/.{a->0};
>e2/.{b->0} Mathematica gives, say, result2.
>
>How can result 1 differ from result 2?
>
>For my specific problem, I also attach a short Mathematica notebook.
>[Contact the author to obtain the notebook - moderator]
>
>I'd appreciate any help.
>
>Many thanks,
>Ron 
>
>
>

Ron,

see Help:

"ReplaceAll looks at each part of expr, tries all the rules on it, and
then goes on to the next part of expr. The first rule that applies to a
particular part is used; no further rules are tried on that part, or on
any of its subparts."

This makes it clear: there *are* differences.  For your special problem,
publish it (according to the rules of this group).

--
Hartmut Wolf


  • Prev by Date: Re: ReplaceAll / sequential replacements versus joint replacement
  • Next by Date: Re: appending '.' in CForm
  • Previous by thread: Re: ReplaceAll / sequential replacements versus joint replacement
  • Next by thread: categorys in the Help Browser