Given
```
def f(self):
from sympy.core.numbers import int_valued
r = self.round(2)
i = int(r)
if int_valued(r):
# non-integer self should pass one of these tests
if (self > i) is S.true:
return i
if (self < i) is S.true:
return i - 1
# is it safe to assume that self == i?
return i ``` Can anyone think of a real numerical expression which will
round up and then not compare with self and cause f to return an integer
that is 1 too large?
--
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 view this discussion on the web visit
https://groups.google.com/d/msgid/sympy/6b5a6978-0015-43ec-af1a-677f070e6941n%40googlegroups.com.