1 | initial version |
You can solve exactly in algebraic numbers and then get results with any precision by using .n()
method:
R.<x,y> = AA[]
eq1 = 2*x^2 + x*y +x - 6
eq2 = 3*x^2 + 2*y^2- y - 6
sols = R.ideal([eq1,eq2]).variety()
[tuple(map(lambda t: s[t].n(digits=20), R.gens())) for s in sols]
2 | No.2 Revision |
You can solve exactly in algebraic numbers (AA
) and then get results in reals with any precision by using .n()
method:
R.<x,y> = AA[]
eq1 = 2*x^2 + x*y +x - 6
eq2 = 3*x^2 + 2*y^2- y - 6
sols = R.ideal([eq1,eq2]).variety()
[tuple(map(lambda t: s[t].n(digits=20), R.gens())) for s in sols]