MathGroup Archive 2010

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

Search the Archive

Re: Replacement Rule with Sqrt in denominator


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