Comment #3 on issue 986 by nicolas.pourcelot: -oo < oo is False http://code.google.com/p/sympy/issues/detail?id=986
Comparisons involving infinities are very hazardous for now (sympy 0.6.4). >>> -1.5 < -oo True I think this is really annoying, because it leads to frequent wrong results. What's more, it doesn't seem so difficult to patch, *at least temporarily*. Even if it's far from prefect, a naive patch like the following would indeed resolve most problems : - for the Infinity class: def __gt__(a, b): if type(b) is Infinity: return False return True def __lt__(a, b): return False def __ge__(a, b): return True def __le__(a, b): if type(b) is Infinity: return True return False - and for the NegativeInfinity class: def __gt__(a, b): return False def __lt__(a, b): if type(b) is NegativeInfinity: return False return True def __ge__(a, b): if type(b) is NegativeInfinity: return True return False def __le__(a, b): return True -- You received this message because you are listed in the owner or CC fields of this issue, or because you starred this issue. You may adjust your issue notification preferences at: http://code.google.com/hosting/settings --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sympy-issues" group. To post to this group, send email to sympy-issues@googlegroups.com To unsubscribe from this group, send email to sympy-issues+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sympy-issues?hl=en -~----------~----~----~----~------~----~------~--~---