[Tutor] How to get the 2 complex cube roots of 1?

Dick Moores rdm at rcblue.com
Thu Dec 9 11:58:34 CET 2004


My trusty $10 Casio calculator tells me that the 3 cube roots of 1 are:
1, (-.5 +0.866025403j), and (-.5 -0.866025403j), or thereabouts. Is there 
a way to do this in Python?

Checking the Casio results with Python:
 >>> 1**3
1
 >>> (-.5 + .866025403j)**3
(0.99999999796196859+1.1766579932626087e-009j)
 >>> (-.5 - .866025403j)**3
(0.99999999796196859-1.1766579932626087e-009j)


Thanks,

Dick Moores
rdm at rcblue.com



More information about the Tutor mailing list