Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2010

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

Search the Archive

Re: precedence for ReplaceAll?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg110602] Re: precedence for ReplaceAll?
  • From: Bill Rowe <readnews at sbcglobal.net>
  • Date: Sun, 27 Jun 2010 04:57:02 -0400 (EDT)

On 6/26/10 at 3:12 AM, siegman at stanford.edu (AES) wrote:

>In article <i023mj$r4u$1 at smc.vnet.net>,
>Bill Rowe <readnews at sbcglobal.net> wrote:
>
>>>My first guess is that Mathematica is doing a sort of "double
>>>ReplaceAll", where it first tries the pattern given in the delayed
>>>assignment, and any symbols matched by that are not tested against
>>>the explicit ReplaceAll. But that doesn't explain why the sum
>>>works and not the product. Am I thinking about this the wrong way?

>>Yes, your thinking here is incorrect.

>Just be to be argumentative here:  The OP's thinking obviously
>doesn't agree with what Mathematica actually does.

In terms of using Mathematica, this is the only aspect that matters.

>But what Mathematica does is not the only standard of correctness, or
>even reasonableness, in the world.  His thinking is not unreasonable,
>and not even incorrect by some reasonable standards.

Sure, it might be reasonable to think the way the OP indicated.
But to do so will clearly get in the way of using Mathematica
efficiently. It is understanding what Mathematica actually does
that is important here.



  • Prev by Date: Re: Sum of terms --> list
  • Next by Date: Automatic Differentiation of mathematica code
  • Previous by thread: Re: precedence for ReplaceAll?
  • Next by thread: Re: precedence for ReplaceAll?