Comment #5 on issue 1894 by asmeurer: Xor(x, 1/y) doesn't work
http://code.google.com/p/sympy/issues/detail?id=1894
I agree with Mateusz about the automatic rewriting. And(True, False)
turning into False and even And(x, y)
turning into And(y, x) is fine. But I think that Implies(x, y)
Comment #3 on issue 1894 by mattpap: Xor(x, 1/y) doesn't work
http://code.google.com/p/sympy/issues/detail?id=1894
how do you compute 1/True and 1/False?
In [1]: 1/True
Out[1]: 1.0
In [2]: 1/False
ZeroDivisionError: float division
I just expect this two inputs should give the same result:
Comment #4 on issue 1894 by ronan.l...@gmail.com: Xor(x, 1/y) doesn't work
http://code.google.com/p/sympy/issues/detail?id=1894
The same operator can have different meanings depending on the context.
In '1 2',
'' means bitwise-and, not boolean-and as in 'x y'. In contrast, 'And'
can only
Status: New
Owner:
Labels: Type-Defect Priority-Medium Logic Milestone-Release0.7.0
New issue 1894 by mattpap: Xor(x, 1/y) doesn't work
http://code.google.com/p/sympy/issues/detail?id=1894
In [6]: Xor(x, 1/y)
---
Comment #1 on issue 1894 by mattpap: Xor(x, 1/y) doesn't work
http://code.google.com/p/sympy/issues/detail?id=1894
I encountered this when working on pretty printers for logic operators,
e.g.:
In [1]: Equivalent(Implies(Or(Not(x), y, z), And(x, 1/y)), Ne(x, y))
Out[1]:
⎛
Comment #2 on issue 1894 by ronan.l...@gmail.com: Xor(x, 1/y) doesn't work
http://code.google.com/p/sympy/issues/detail?id=1894
The problem with Xor(x, 1/y) is that its meaning is undefined: how do you
compute
1/True and 1/False? Nevertheless, And(x, 1/y) works, so this should too.
All that