From: Bin Gong <twain@it...> - 2009-11-12 08:49:40
My problem is about the operator "sqrt".
In old version such as reduce 3.6 or 3.7, sqrt(x^2-2*x+1) gives the
result abs(x-1) correctly, but now it turns out to be x-1, no matter I
turn the switch PRECISE on or off.
If I replace the expression in sqrt into "x^2", it gives "abs(x)"
Reduce (Free PSL version), 12-Nov-2009 ...
x - 1
Does anyone know how to make the operator work properly in current open
version like in reduce 3.7? I am using a psl build of open source
Looking forward to your reply.
From: Arthur Norman <acn1@ca...> - 2009-11-12 09:03:03
On Thu, 12 Nov 2009, Bin Gong wrote:
> In old version such as reduce 3.6 or 3.7, sqrt(x^2-2*x+1) gives the
> result abs(x-1) correctly, but now it turns out to be x-1, no matter I
> turn the switch PRECISE on or off.
A bunch of us have been having a fairly intensive discussion about this
both to try to understand why the behaviour had changed since 3.7 and to
ensure that a fix would be a real one rather than a mere patch that dealt
with just one case but that risked hurting something elsewhere. I hope
that in the next weeks some changes that deal with this are checked in,
but as of today I can not give you a reliable time promise. Eg our
discussion included the observation that if you think in terms of complex
arithmetic the insertion of "abs" is not good, and a number of the reduce
sub-packages explicitly switch "precise" off while they are doing their
So your comment has been heard!
Get latest updates about Open Source Projects, Conferences and News.