Terrence Cole wrote: >>>> -0.1 ** 0.1 > -0.7943282347242815 >>>> a = -0.1; b = 0.1 >>>> a ** b > (0.7554510437117542+0.2454609236416552j) >>>> -abs(a ** b) > -0.7943282347242815 > > Why does the literal version return the signed magnitude and the > variable version return a complex?
The binary power operator has a higher precedence than the unary negative operator. -0.1 ** 0.1 is equal to -(0.1**0.1) Christian -- http://mail.python.org/mailman/listinfo/python-list