Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Trac #34341: Fix
bool(expr1 != expr2)
for nontrivially equal expres…
…sions As reported on [https://groups.google.com/g/sage-devel/c/rXZeGZjAIdU sage-devel]: {{{ sage: a = x^2 + 2*x + 1 sage: b = (x + 1)^2 sage: c = a != b sage: bool(c) True }}} Note that {{{ sage: bool(c.expand()) False }}} This is due to calling `is_trivial_zero` instead of `is_zero` in the `__bool__` method for symbolic expressions. The fix provided by this ticket is not intended to fix other existing `bool(expr1 != expr2)` issues (e.g. #33698). URL: https://trac.sagemath.org/34341 Reported by: tmonteil Ticket author(s): Thierry Monteil Reviewer(s): Samuel Lelièvre
- Loading branch information