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.Wed, 05 Aug 2020 01:09:56 +0200Sage fails to recognize `1 + (1/2 + i*sqrt(3)/2)^3` is zerohttps://ask.sagemath.org/question/52863/sage-fails-to-recognize-1-12-isqrt323-is-zero/The following code:
print( 1 + ( 1/2 + i*sqrt(3)/2 )^3 )
print( simplify( 1 + ( 1/2 + i*sqrt(3)/2 )^3) )
print( N(1 + ( 1/2 + i*sqrt(3)/2 )^3) )
Results in the output:
(1/2*I*sqrt(3) + 1/2)^3 + 1
(1/2*I*sqrt(3) + 1/2)^3 + 1
2.22044604925031e-16 + 1.11022302462516e-16*I
but I'd expect the middle one, and perhaps even the first one, to be just "0." I think this means that there is something which I don't understand about how these expressions are handled.
Gregory BardWed, 05 Aug 2020 01:09:56 +0200https://ask.sagemath.org/question/52863/