8000 Evaluate Relationals when casting to bool by qthequartermasterman · Pull Request #354 · symengine/symengine.py · GitHub
[go: up one dir, main page]

Skip to content

Evaluate Relationals when casting to bool #354

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Prev Previous commit
Next Next commit
Update test_eval.py
Fixed incorrect evaluation test. To get rid of a sin(x)**2, we need to subtract sin(x)**2, not x**2.
  • Loading branch information
qthequartermasterman committed Jun 5, 2021
commit 290f916cd6836f5b798d0866b8877cabd2d8bbf3
2 changes: 1 addition & 1 deletion symengine/tests/test_eval.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def test_eval_double2():
x = Symbol("x")
e = sin(x)**2 + sqrt(2)
raises(RuntimeError, lambda: e.n(real=True))
assert abs(e.n() - x**2 - 1.414) < 1e-3
assert abs(e.n() - sin(x)**2.0 - 1.414) < 1e-3

def test_n():
x = Symbol("x")
Expand Down
0