[Date Index]
[Thread Index]
[Author Index]
Re: Replacement Rule with Sqrt in denominator
*To*: mathgroup at smc.vnet.net
*Subject*: [mg114332] Re: Replacement Rule with Sqrt in denominator
*From*: Richard Fateman <fateman at cs.berkeley.edu>
*Date*: Wed, 1 Dec 2010 02:12:17 -0500 (EST)
On 11/30/2010 8:22 AM, Murray Eisenberg wrote:
> It's not a bug (and not really a "feature", either):
>
> FullForm[1/Sqrt[x]]
> Power[x,Rational[-1,2]]
>
> Thus there is no "Sqrt[x] really in 1/Sqrt[x] (the latter being just a
> quick input form), just as there is no "I" in 1+2I.
The bug is not in the representation. It is in the rule processing.
After all, a rule replacing Sqrt[x] by y could also replace
(x)^(-1/2) by y^(-1).
That would "fix" the "feature".
>
> On 11/30/2010 4:05 AM, Richard Fateman wrote:
>> On 11/20/2010 3:11 AM, kj wrote:
>>
>>>
>>> I don't know a way to write the replacement rule so that it works
>>> for both Sqrt[x] and 1/Sqrt[x], but maybe someone else does.
>>>
>>> ~kj
>>>
>> See
>> www.cs.berkeley.edu/~fateman/papers/better-rules.pdf
>>
>> which describes how one can automatically produce rules that overcome
>> this bug in Mathematica. oops. I mean rules that overcome this
>> "feature" in Mathematica.
>>
>> RJF
>>
>>
>
To quote from the above paper...
The argument that Mathematica already does
the right thing by \literally" matching expressions loses much of its
force by observing how frequently
mathematicians report its behavior as erroneous.
This report by kj is just another incident. You could argue "the
customer is always wrong", but you
don't really have to do that. See the referenced paper.
RJF
Prev by Date:
**Re: Re-virginating Manipulates?**
Next by Date:
**Re: C compiler error Mathematica 8 and Cuda**
Previous by thread:
**Re: Replacement Rule with Sqrt in denominator**
Next by thread:
**Re: Replacement Rule with Sqrt in denominator**
| |