Status: New
Owner: ----
Labels: Type-Defect Priority-Medium
New issue 1634 by jorn.baayen: Cannot compare NumberSymbols like pi and E
http://code.google.com/p/sympy/issues/detail?id=1634
In [124]: pi < 0
Out[124]: False
In [125]: pi > 0
Out[125]: -π < 0
This is because class NumberSymbol implements '<' such that
def __gt__(self, other):
return (-self) < (-other)
reducing the above issue to the problem where Add and Mul don't
implement comparison:
In [126]: x=Symbol('x',is_real=True)
In [127]: x+2<x+3
Out[127]: 2 + x < 3 + x (should be: True)
In [128]: (-1)*x<(-1)*x
Out[128]: -x < -x (should be: False)
--
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 [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/sympy-issues?hl=en
-~----------~----~----~----~------~----~------~--~---