On Dec 22, 9:18 am, Christian Heimes <li...@cheimes.de> wrote: > Sure? :) Are you aware that the IEEE 754 standard makes a difference > between the floats +0.0 and -0.0? > > from math import atan2 > def sign(x): > if x > 0 or (x == 0 and atan2(x, -1.) > 0.): > return 1 > else: > return -1
Is "x ** 0 > 0." instead of "atan2(x, -1.) > 0." unreliable across platforms? -- http://mail.python.org/mailman/listinfo/python-list