Re: Sqrt discrepancy, Mathematica



Documented? Hah.
If it screws up a lot of your programs, then you could consider putting Abs[] in some places. As you undoubtedly know, a positive real number has TWO square roots. If you always want the positive one, that should be your decision. You want Mathematica to make the decision, and apparently it changed the way it does that between version 4.2 and 5. If you want it to be "correct" all the time, I think it is unrealistic of you to expect this to happen just in the simplifier for Sqrt[].
RJF

Roger Beresford wrote:
In Mathematica 4.2, Sqrt[b-a] prints as -/(b-a) (Sqrt symbol), and
gives 2 when e.g. a->2,b->6
In Mathematica 5 it prints as i(a-b)^(1/2) and gives -2, not 2.
Is this documented, and how is it justified? It screws up a lot of my
programmes.


.