Python undesirable complex numbers -
this question has answer here:
- wrong value cube root in python 3 answers
>>> = -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
Post a Comment