MathGroup Archive 2010

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

Search the Archive

Re: Replacement Rule with Sqrt in denominator

  • To: mathgroup at smc.vnet.net
  • Subject: [mg114684] Re: Replacement Rule with Sqrt in denominator
  • From: Richard Fateman <fateman at cs.berkeley.edu>
  • Date: Mon, 13 Dec 2010 03:50:49 -0500 (EST)
  • References: <ie28tv$ml7$1@smc.vnet.net>

On 12/12/2010 2:42 AM, Themis Matsoukas wrote:
>> It's a consequence of two very simple considerations:
>>
>> 1. Pattern matching works on FullForm.
>>
>> 2. Pattern matching can't split atoms.
>>
>> What's so hard about this?


being right 50% of the time suggests that maybe it is hard.
You can write a pattern like Rational[n_,m_]->   f[n,m]
So your item 2. is wrong.

and probably your item 1 is overly simplified for tricky cases.




RJF


  • Prev by Date: Wolfram does not support Mathematica 8.0 on SUN OS
  • Next by Date: Re: Puzzled by IntegerPart
  • Previous by thread: Re: Replacement Rule with Sqrt in denominator
  • Next by thread: Re: Replacement Rule with Sqrt in denominator