ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Sat, 11 Apr 2015 00:39:58 +0200Why is sage giving me wrong answers?https://ask.sagemath.org/question/26490/why-is-sage-giving-me-wrong-answers/ Let's say I want to multiply $(\frac{-1 - i \sqrt{3}}{2})(\frac{-1 + i \sqrt{3}}{2})$. Doing it by hand, we easily see that the answer is 1.
However, when I type
n(((-1 + sqrt(-3))/2)*((-1-sqrt(-3))/2))
in sage, I get
1 - 5.55111512312578 x 10^(-17)i
which is (of course) very close to 1...but its not exactly 1. Why is that? How do I fix this??ArtusSat, 11 Apr 2015 00:39:58 +0200https://ask.sagemath.org/question/26490/