I am generating a matrix that its entries come from roots of a polynomial which are all real. Due to calculation errors sage returns entries such as: -2.8 + 2.2e-16*I
How can I ask sage to ignore the small imaginary part and return -2.8?
| 1 | initial version |
I am generating a matrix that its entries come from roots of a polynomial which are all real. Due to calculation errors sage returns entries such as: -2.8 + 2.2e-16*I
How can I ask sage to ignore the small imaginary part and return -2.8?
Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.