Re: Issue 2848 in sympy: Failing test in sympy/solvers/test/test_solvers.py

2011-11-17 Thread sympy
Comment #6 on issue 2848 by ronan.l...@gmail.com: Failing test in sympy/solvers/test/test_solvers.py http://code.google.com/p/sympy/issues/detail?id=2848 Narrowing it down further: clear_cache() simplify(I*pi) I*pi simplify(log(log(-2)) - log(log(2))) log((log(2) + I*pi)/log(2)) -- You

Re: Issue 2848 in sympy: Failing test in sympy/solvers/test/test_solvers.py

2011-11-17 Thread sympy
Comment #7 on issue 2848 by asmeu...@gmail.com: Failing test in sympy/solvers/test/test_solvers.py http://code.google.com/p/sympy/issues/detail?id=2848 I can reproduce that, but if I try checking (log(2) + I*pi).is_positive in the middle of it, it stops breaking: In [1]: simplify(I*pi) Ou

Re: Issue 2848 in sympy: Failing test in sympy/solvers/test/test_solvers.py

2011-11-17 Thread sympy
Comment #8 on issue 2848 by ronan.l...@gmail.com: Failing test in sympy/solvers/test/test_solvers.py http://code.google.com/p/sympy/issues/detail?id=2848 Actually, you don't need to restart the session, clearing the cache is enough, fortunately. After some single-stepping in WinPdb, I've

Re: Issue 2848 in sympy: Failing test in sympy/solvers/test/test_solvers.py

2011-11-17 Thread sympy
Comment #9 on issue 2848 by ronan.l...@gmail.com: Failing test in sympy/solvers/test/test_solvers.py http://code.google.com/p/sympy/issues/detail?id=2848 I've found a sequence of calls to assumptions that gives a wrong result: clear_cache() e = I*pi e.is_composite False e.is_positive Tru

Re: Issue 2848 in sympy: Failing test in sympy/solvers/test/test_solvers.py

2011-11-17 Thread sympy
Comment #10 on issue 2848 by ronan.l...@gmail.com: Failing test in sympy/solvers/test/test_solvers.py http://code.google.com/p/sympy/issues/detail?id=2848 Mul._eval_is_irrational is the culprit, like in issue 2696. We probably just need to push Tom's fix in. -- You received this message b

Re: Issue 2818 in sympy: factor() returns nan

2011-11-17 Thread sympy
Comment #3 on issue 2818 by smi...@gmail.com: factor() returns nan http://code.google.com/p/sympy/issues/detail?id=2818 Also, simply expanding the rewrite allows factor to work. I also note the following: The original equation and the rewritten form >>> p.count_ops(1) 212*ADD +

Re: Issue 2848 in sympy: Failing test in sympy/solvers/test/test_solvers.py

2011-11-17 Thread sympy
Comment #11 on issue 2848 by asmeu...@gmail.com: Failing test in sympy/solvers/test/test_solvers.py http://code.google.com/p/sympy/issues/detail?id=2848 Where is Tom's fix? -- You received this message because you are subscribed to the Google Groups "sympy-issues" group. To post to this gro

Re: Issue 2848 in sympy: Failing test in sympy/solvers/test/test_solvers.py

2011-11-17 Thread sympy
Updates: Labels: -Assumptions -WrongResult Comment #12 on issue 2848 by ronan.l...@gmail.com: Failing test in sympy/solvers/test/test_solvers.py http://code.google.com/p/sympy/issues/detail?id=2848 It's in PR #504, I already pushed it in and it does fix the problem - by making the t

Issue 2851 in sympy: logcombine(log(3) - log(2)) does nothing

2011-11-17 Thread sympy
Status: Accepted Owner: Labels: Type-Defect Priority-Medium Simplify New issue 2851 by ronan.l...@gmail.com: logcombine(log(3) - log(2)) does nothing http://code.google.com/p/sympy/issues/detail?id=2851 logcombine(log(3) - log(2)) should return log(3/2) but it doesn't. This used to wor

Re: Issue 2848 in sympy: Failing test in sympy/solvers/test/test_solvers.py

2011-11-17 Thread sympy
Comment #13 on issue 2848 by ronan.l...@gmail.com: Failing test in sympy/solvers/test/test_solvers.py http://code.google.com/p/sympy/issues/detail?id=2848 The logcombine issue is more general, see issue 2851. -- You received this message because you are subscribed to the Google Groups "symp

Re: Issue 2851 in sympy: logcombine(log(3) - log(2)) does nothing

2011-11-17 Thread sympy
Updates: Cc: smi...@gmail.com Comment #1 on issue 2851 by ronan.l...@gmail.com: logcombine(log(3) - log(2)) does nothing http://code.google.com/p/sympy/issues/detail?id=2851 Bisected to: commit 9dc1d111d489624eef3b0c9481c3e6d99cd869e0 Author: Chris Smith Date: Fri May 20 00:11:41

Re: Issue 2851 in sympy: logcombine(log(3) - log(2)) does nothing

2011-11-17 Thread sympy
Comment #2 on issue 2851 by asmeu...@gmail.com: logcombine(log(3) - log(2)) does nothing http://code.google.com/p/sympy/issues/detail?id=2851 It's because we have: In [46]: log(S(3)/2) Out[46]: -log(2) + log(3) so obviously it's impossible for logcombine to combine them. Perhaps this sho

Re: Issue 2851 in sympy: logcombine(log(3) - log(2)) does nothing

2011-11-17 Thread sympy
Updates: Status: NeedsDecision Comment #3 on issue 2851 by asmeu...@gmail.com: logcombine(log(3) - log(2)) does nothing http://code.google.com/p/sympy/issues/detail?id=2851 By the way, I remember being not sure about this change. Perhaps Chris will remember where the discussion was

Re: Issue 2848 in sympy: Failing test in sympy/solvers/test/test_solvers.py

2011-11-17 Thread sympy
Updates: Cc: smi...@gmail.com nicolas@gmail.com Comment #14 on issue 2848 by asmeu...@gmail.com: Failing test in sympy/solvers/test/test_solvers.py http://code.google.com/p/sympy/issues/detail?id=2848 I think issue 2851 is a different issue (see my comments there). If solve calls

Re: Issue 2851 in sympy: logcombine(log(3) - log(2)) does nothing

2011-11-17 Thread sympy
Comment #4 on issue 2851 by ronan.l...@gmail.com: logcombine(log(3) - log(2)) does nothing http://code.google.com/p/sympy/issues/detail?id=2851 Right, I had forgotten about that, but if you step through the code, you can see that it doesn't even try to return log(3/2), and there is the same

Re: Issue 2851 in sympy: logcombine(log(3) - log(2)) does nothing

2011-11-17 Thread sympy
Comment #5 on issue 2851 by smi...@gmail.com: logcombine(log(3) - log(2)) does nothing http://code.google.com/p/sympy/issues/detail?id=2851 see also duplicate(?) issue 2709 -- You received this message because you are subscribed to the Google Groups "sympy-issues" group. To post to this gro

Re: Issue 2851 in sympy: logcombine(log(3) - log(2)) does nothing

2011-11-17 Thread sympy
Comment #6 on issue 2851 by smi...@gmail.com: logcombine(log(3) - log(2)) does nothing http://code.google.com/p/sympy/issues/detail?id=2851 are you referring to the discussion on issue 2397 ? -- You received this message because you are subscribed to the Google Groups "sympy-issues" group.

Re: Issue 2851 in sympy: logcombine(log(3) - log(2)) does nothing

2011-11-17 Thread sympy
Comment #7 on issue 2851 by smi...@gmail.com: logcombine(log(3) - log(2)) does nothing http://code.google.com/p/sympy/issues/detail?id=2851 To me it seems like `log(x/2)` should autoexpand like `sqrt(4*x)` 2*sqrt(x) log(x/2) -- You received this message because you are subscribed to the Go

Re: Issue 2851 in sympy: logcombine(log(3) - log(2)) does nothing

2011-11-17 Thread sympy
Comment #8 on issue 2851 by smi...@gmail.com: logcombine(log(3) - log(2)) does nothing http://code.google.com/p/sympy/issues/detail?id=2851 I don't mind if the autoevaluation goes away, but the logic for it should not be duplicated (which makes tracking down logic errors difficult). Could

Issue 2852 in sympy: is_constant(wrt) is needed

2011-11-17 Thread sympy
Status: Accepted Owner: smi...@gmail.com Labels: Type-Defect Priority-Medium New issue 2852 by smi...@gmail.com: is_constant(wrt) is needed http://code.google.com/p/sympy/issues/detail?id=2852 Although I think I am the one that gave Integral the is_number logic, I think that is_number should b

Re: Issue 2852 in sympy: is_constant(wrt) is needed

2011-11-17 Thread sympy
Comment #1 on issue 2852 by ronan.l...@gmail.com: is_constant(wrt) is needed http://code.google.com/p/sympy/issues/detail?id=2852 Sum(x,(x,1,10)).is_number == False is a bug. For the rest, I don't understand the distinction you're trying to make: evaluating pi is non-trivial and certainly mu

Re: Issue 2852 in sympy: is_constant(wrt) is needed

2011-11-17 Thread sympy
Comment #3 on issue 2852 by smi...@gmail.com: is_constant(wrt) is needed http://code.google.com/p/sympy/issues/detail?id=2852 I guess what I mean, then, is that is_number should give confidence in being able to evalf and not hang because of some undoable entity like a nasty integral.or sum -- Y

Re: Issue 2852 in sympy: is_constant(wrt) is needed

2011-11-17 Thread sympy
Comment #2 on issue 2852 by smi...@gmail.com: is_constant(wrt) is needed http://code.google.com/p/sympy/issues/detail?id=2852 And even if we can't prove that something is zero at least we can know if it's constant (see last example): >>> def is_constant(self, *wrt): ... if self.

Re: Issue 2852 in sympy: is_constant(wrt) is needed

2011-11-17 Thread sympy
Comment #4 on issue 2852 by smi...@gmail.com: is_constant(wrt) is needed http://code.google.com/p/sympy/issues/detail?id=2852 I guess I would rather have None come back for "potentially unevaluatable" is_number requests. So if a routine can't figure out if (without doit) that doing doit will suc