On Thursday, February 12, 2015 at 10:26:32 PM UTC+3, Arnaud Usciati wrote: > > Maybe abs() function have to be reconsidered, because I found other issues > with abs... >
All examples above are solved with patch from https://github.com/skirpichev/omg/pull/82 (on top of the https://github.com/skirpichev/omg/pull/154) That should work for sympy with trivial replacements (is_extended_real -> is_real). limit(abs(ln(x))-ln(x), x, 2) or limit(abs(ln(x))-ln(x), x, 2, '+') return > 0 (OK), but limit(abs(ln(x))-ln(x), x, 2, '-') runs endless and I need to > interrupt it to stop calculating.. Same way with functions : > abs(cos(x))-cos(x) or abs(sin(x))-sin(x) or abs(sqrt(x))-sqrt(x) for x = > symbols('x', real=True) > The problem is that nseries constantly emits an Order term and lseries can't yield anything at all. But for real, positive _and finite_ x < 1: abs(ln(2-x))-ln(2-x) == 0. But if I try : limit(abs(ln(x))-ln(x), x, a, '-') with a = symbols('a', > real=True), it returns (sign(log(a)) - 1)*log(a). Idem for the direction > '+' and without direction. > This is an example of lucky answer, due to a non-strict approach in the calculate_series routine to the zero-decision problem. I.e. if sympy can't simplify term to zero, it thinks term is nonzero. Wrong idea in general, but in this particular case it happens to be right. -- You received this message because you are subscribed to the Google Groups "sympy" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/sympy. To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/394800bf-d5b2-42d1-826a-aac73f9f3409%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
