Status: New
Owner:
Labels: Type-Defect Priority-Medium
New issue 2081 by rosen.diankov: Pow substitution introduces wrong answers
http://code.google.com/p/sympy/issues/detail?id=2081
The most simplest example is:
x=Symbol('x')
(x**3).subs(x**2,Symbol('y'))
y**(3/2)
Regardless if x is Re
Updates:
Status: Fixed
Comment #22 on issue 2081 by smi...@gmail.com: Pow substitution introduces
wrong answers
http://code.google.com/p/sympy/issues/detail?id=2081
This was fixed with 5b9c5cc8c6b20947e9d53db2ce0b2e9ba2078e7e:
(1/z).subs(1/z**2, a)
1/z
(x**3).subs(x**2,Symbol('y')
Comment #1 on issue 2081 by rosen.diankov: Pow substitution introduces
wrong answers
http://code.google.com/p/sympy/issues/detail?id=2081
the reason why there is two answers is because:
y**(3/2) = y * y**0.5 = 1 * (+- 1)
--
You received this message because you are subscribed to the Google
Updates:
Labels: Matching
Comment #2 on issue 2081 by asmeurer: Pow substitution introduces wrong
answers
http://code.google.com/p/sympy/issues/detail?id=2081
So it's fine if x is positive, right? For example, if instead of x**3, you
had exp(3), this is just fine. This is a common
Comment #3 on issue 2081 by rosen.diankov: Pow substitution introduces
wrong answers
http://code.google.com/p/sympy/issues/detail?id=2081
this substitution does not hold for all values of x and thus leads to
really hard-to-reproduce bugs.
i'm using sympy for a serious application where us
Updates:
Status: Accepted
Labels: Integration
Comment #4 on issue 2081 by asmeurer: Pow substitution introduces wrong
answers
http://code.google.com/p/sympy/issues/detail?id=2081
So I made the change you suggested (except I didn't consider the positive
assumption yet) and ra
Comment #5 on issue 2081 by asmeurer: Pow substitution introduces wrong
answers
http://code.google.com/p/sympy/issues/detail?id=2081
This is the change I made by the way:
diff --git a/sympy/core/power.py b/sympy/core/power.py
index c121f45..e93c4b3 100644
--- a/sympy/core/power.py
+++ b/sym
Comment #6 on issue 2081 by ffxvzero: Pow substitution introduces wrong
answers
http://code.google.com/p/sympy/issues/detail?id=2081
hi asmeurer,
thanks for looking into the problem, that is the exact changes i was
referring to.
i looked at the issue 790, and i would say that "x -> sqrt(
Comment #8 on issue 2081 by rosen.diankov: Pow substitution introduces
wrong answers
http://code.google.com/p/sympy/issues/detail?id=2081
hi asmeurer,
thanks for looking into the problem, that is the exact changes i was
referring to.
i looked at the issue 790, and i would say that "x ->
Comment #9 on issue 2081 by asmeurer: Pow substitution introduces wrong
answers
http://code.google.com/p/sympy/issues/detail?id=2081
./setup.py test will run all tests. ./bin/test will test just one
path (which Is faster if you know where yu want to look at).
As for that substitution, yo
Comment #10 on issue 2081 by rosen.diankov: Pow substitution introduces
wrong answers
http://code.google.com/p/sympy/issues/detail?id=2081
From reading the issues, it seems that other users have different
expectations of what "subs" is really supposed to be doing. If substitution
for inte
Comment #11 on issue 2081 by asmeurer: Pow substitution introduces wrong
answers
http://code.google.com/p/sympy/issues/detail?id=2081
Well, I think it makes sense to keep that implementation still encapsulated
within the subs method. The ideal solution here in my opinion would be to
have
Comment #12 on issue 2081 by smi...@gmail.com: Pow substitution introduces
wrong answers
http://code.google.com/p/sympy/issues/detail?id=2081
This substitution is already prohibited in my t2 branch...from which
portions are in review.
h[1] >>> (x**3).subs(x**2,Symbol('y'))
x**3
Comment #13 on issue 2081 by asmeurer: Pow substitution introduces wrong
answers
http://code.google.com/p/sympy/issues/detail?id=2081
How does it work for exp?
I don't think prohibiting it will work because there are some places that
require it to work (create the fractional exponent), and
Comment #14 on issue 2081 by smi...@gmail.com: Pow substitution introduces
wrong answers
http://code.google.com/p/sympy/issues/detail?id=2081
All the tests pass there. But it seems that exp should never be invalid b/c
the base is positive so exp(x)**y = exp(x*y) = exp(y)**x.
--
You receiv
Comment #15 on issue 2081 by smi...@gmail.com: Pow substitution introduces
wrong answers
http://code.google.com/p/sympy/issues/detail?id=2081
But t2 also support algebraic subs:
h[3] >>> exp(x**3).subs(x, Eq(x**2, y))
exp(y**(3/2))
Here, you are saying "replace x with the first solu
Comment #16 on issue 2081 by asmeurer: Pow substitution introduces wrong
answers
http://code.google.com/p/sympy/issues/detail?id=2081
But we need three types of substitution. Exact substitution (issue 2026),
algebraic substitution (what it does now), and a mix that does the
algebraic sub
Comment #17 on issue 2081 by ffxvzero: Pow substitution introduces wrong
answers
http://code.google.com/p/sympy/issues/detail?id=2081
hi guys,
an openrave rpm package for fedora core will be released soon, which relies
on this bug being fixed.
https://bugzilla.redhat.com/show_bug.cgi?id=
Updates:
Cc: smi...@gmail.com
Labels: -Priority-Medium Priority-High
Comment #18 on issue 2081 by asmeurer: Pow substitution introduces wrong
answers
http://code.google.com/p/sympy/issues/detail?id=2081
If someone fixes it before then, it will. I'll raise the priority for
y
Updates:
Blockedon: 2026
Comment #19 on issue 2081 by asmeurer: Pow substitution introduces wrong
answers
http://code.google.com/p/sympy/issues/detail?id=2081
(No comment was entered for this change.)
--
You received this message because you are subscribed to the Google Groups
"symp
Comment #20 on issue 2081 by smi...@gmail.com: Pow substitution introduces
wrong answers
http://code.google.com/p/sympy/issues/detail?id=2081
Issue 2617 is another manifestation of this issue in that
(1/z).subs(1/z**2, a) gives sqrt(a) which is not right if z is -1.
--
You received this m
Comment #21 on issue 2081 by smi...@gmail.com: Pow substitution introduces
wrong answers
http://code.google.com/p/sympy/issues/detail?id=2081
Issue 2617 has been merged into this issue.
--
You received this message because you are subscribed to the Google Groups
"sympy-issues" group.
To pos
22 matches
Mail list logo