Re: ReplaceAll bug
- To: mathgroup at yoda.physics.unc.edu
- Subject: Re: ReplaceAll bug
- From: Silvio Levy <levy at math.berkeley.edu>
- Date: Fri, 31 Jan 92 20:06:34 PST
> Sqrt[240] /. Sqrt[x_] -> 2 Sqrt[x/4] > 4 Sqrt[15] > > Sqrt[480] /. Sqrt[x_] -> 2 Sqrt[x/4] > Sqrt[480] This isn't a problem with ReplaceAll, but with the seemingly random normalization adopted by Sqrt. Sqrt[240] is automatically converted to 4 Sqrt[15], then the substitution rule transforms that into 8 Sqrt[15/4], which is automatically normalized again to 4 Sqrt[15] (try it). In the bottom example, the substitution rule acts first, giving 2 Sqrt[120], and this is normalized to Sqrt[480]. Does anybody know if there is any rhyme or reason to these normal forms? Silvio