Python undesirable complex numbers -


this question has answer here:

>>> = -27 >>> ** (1/3) (1.5000000000000004+2.598076211353316j) >>> -27 ** (1/3) -3.0 

i have raise numbers of list power 1/3 when number negative complex number. why there such difference in results of these 2 operations , how can avoid first one?

when set a=-27, assigning negative value well. when type in -27**(1/3) computes exponent first , negative sign. may reason issue.


Comments

Popular posts from this blog

neo4j - finding mutual friends in a cypher statement starting with three or more persons -

php - How to remove letter in front of the word laravel -

minify - Minimizing css files -