1 | initial version |
Here is the actual error message. If you are not familiar with such systems, you may have been misled by the traceback (which goes through the code in the order it's executed in the system).
ValueError: too many values to unpack (expected 2)
Let's print C
.
sage: C
[w == -1/2*(I*sqrt(3) + 1)*(3/22151168*I*sqrt(2)*sqrt(17080647) + 1153673/575930368)^(1/3) - 1/1384448*(-11545*I*sqrt(3) + 11545)/(3/22151168*I*sqrt(2)*sqrt(17080647) + 1153673/575930368)^(1/3) + 131/832, w == -1/2*(-I*sqrt(3) + 1)*(3/22151168*I*sqrt(2)*sqrt(17080647) + 1153673/575930368)^(1/3) - 1/1384448*(11545*I*sqrt(3) + 11545)/(3/22151168*I*sqrt(2)*sqrt(17080647) + 1153673/575930368)^(1/3) + 131/832, w == (3/22151168*I*sqrt(2)*sqrt(17080647) + 1153673/575930368)^(1/3) + 11545/692224/(3/22151168*I*sqrt(2)*sqrt(17080647) + 1153673/575930368)^(1/3) + 131/832]
This isn't a value of an expression, it's a list of solutions. So we use a nifty thing called a list comprehension to get them all approximated.
sage: [numerical_approx(c.rhs()) for c in C]
[0.0573091049586257 - 4.16333634234434e-17*I,
0.00133665963111623 + 4.16333634234434e-17*I,
0.413710004641027 + 3.46944695195361e-18*I]
Hope this helps! Learning a little Python will go a LONG way toward getting tons of usefulness out of Sage.