> >>> (-1)**(1/3) 
> (0.5000000000000001+0.8660254037844386j) 

Your example illustrates twice that an operation can lead to a bigger 
set : 1/3 is a python float :-)


It is puzzling, but it does not seem to be so.

If 1/3 would be a python float, (-1)**(1/3) is not defined under the usual 
definition of x^y = exp(y*ln(x)) with the standard branch cut for the 
logarithmic function. 

Python seems to deal with (-1)**(1/3) as a fractional power, and thus gives 
the primitive cube root of -1 as a complex number. 

Python doc says math.pow(-1, 1/3) converts 1/3 to a python float, and 
raises an error, unlike (-1)**(1/3). Thus math.pow seems to use the usual 
definition of x^y.

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-devel/1d41068a-2fa1-4dcf-ada8-fa2348d38efen%40googlegroups.com.

Reply via email to