[issue30933] Python not IEEE 754 float compliant for various zero operations

2017-07-14 Thread Mark Dickinson
Mark Dickinson added the comment: (-0) ** 0.5 is a power operation, not a square root operation. As such, the relevant part of IEEE 754-2008 is section 9.2.1, "Special values", which says: > pow (±0, y) is +0 for finite y > 0 and not an odd integer For the other cases, in general the philosoph

[issue30933] Python not IEEE 754 float compliant for various zero operations

2017-07-14 Thread R. David Murray
R. David Murray added the comment: If I remember correctly, the exceptions adhere to the standard because it gives the option of "signaling" in those cases (but in any case it is the behavior we want). 0.5 is a float, so x**.5 is not the square root. >>> math.sqrt(-0.0) -0.0 I'm clos

[issue30933] Python not IEEE 754 float compliant for various zero operations

2017-07-14 Thread Bobblehead
Changes by Bobblehead : -- title: Python not IEEE 754 float compliant for various zero results -> Python not IEEE 754 float compliant for various zero operations ___ Python tracker