Skip to content

Commit

Permalink
Add regression test
Browse files Browse the repository at this point in the history
  • Loading branch information
skirpichev committed Mar 19, 2017
1 parent 18de700 commit 621c93a
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
15 changes: 15 additions & 0 deletions diofant/solvers/tests/test_polysys.py
Expand Up @@ -138,3 +138,18 @@ def test_solve_sympyissue_6785_RR():
assert roots[0][y].epsilon_eq(-499.474999374969, 1e12)
assert roots[1][x] == 0
assert roots[1][y].epsilon_eq(500.474999374969, 1e12)


def test_sympyissue_12345():
eqs = (x**2 - y - sqrt(2), x**2 + x*y - y**2)
r0, r1, r2, r3 = Poly(y**4 - 3*y**3 + y**2*(-3*sqrt(2) + 1) +
2*sqrt(2)*y + 2, y).all_roots()
sol = [{x: sqrt(2)*r0**3/2 - 3*sqrt(2)*r0**2/2 - 2*r0 + sqrt(2)*r0/2 + 1,
y: r0},
{x: sqrt(2)*r1**3/2 - 3*sqrt(2)*r1**2/2 - 2*r1 + sqrt(2)*r1/2 + 1,
y: r1},
{x: sqrt(2)*r2**3/2 - 3*sqrt(2)*r2**2/2 - 2*r2 + sqrt(2)*r2/2 + 1,
y: r2},
{x: sqrt(2)*r3**3/2 - 3*sqrt(2)*r3**2/2 - 2*r3 + sqrt(2)*r3/2 + 1,
y: r3}]
assert solve_poly_system(eqs, x, y) == sol
3 changes: 2 additions & 1 deletion docs/release/notes-0.9.rst
Expand Up @@ -125,8 +125,9 @@ Issues closed
* :sympyissue:`11911` typo in docs of printing
* :sympyissue:`10489` Mathematical Symbol does not seem to serialize correctly LaTeX printer
* :sympyissue:`10336` nsimplify problems with `oo` and `inf`
* :sympyissue:`12345` nonlinsolve (solve_biquadratic) gives no solution with radical

.. last pr: #390
.. last pr: #448
See also full `list of closed issues
<https://github.com/diofant/diofant/issues?q=is%3Aissue+milestone%3A0.9.0+is%3Aclosed>`_
Expand Down

0 comments on commit 621c93a

Please sign in to comment.