Ask Your Question

Artus's profile - activity

2018-12-02 22:51:27 -0500 received badge  Notable Question (source)
2016-04-25 13:59:32 -0500 received badge  Popular Question (source)
2015-04-13 14:03:42 -0500 received badge  Student (source)
2015-04-10 19:01:11 -0500 received badge  Scholar (source)
2015-04-10 18:08:45 -0500 commented answer Why is sage giving me wrong answers?

@Pierre Thanks a lot. It works now...but I don't really understand what you mean when you say "Do not use floating points". I just wrote the numbers as they were...what do you mean by "floating points"?

2015-04-10 17:39:58 -0500 asked a question 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??