no sign() function ?

Mark Dickinson dickinsm at gmail.com
Tue Dec 23 11:45:37 EST 2008


On Dec 23, 4:27 pm, ajaksu <aja... at gmail.com> wrote:
> Is "x ** 0 > 0." instead of "atan2(x, -1.) > 0." unreliable across
> platforms?

x**0 doesn't distinguish between x = -0.0 and x = 0.0.

I suspect you're confusing -0.0**0.0 with (-0.0)**0.0.

Mark




More information about the Python-list mailing list