Pierre Denis <pie.de...@skynet.be> added the comment: > So this justifies things like `sqrt(-0.0)` giving a zero result (rather than > being considered invalid)
Well, I didn’t noticed that the wolf was already in the henhouse! This choice seems disputable for me because it is precisely a case where f(-0.0) should NOT behave as f(+0.0). The treatment of functions like atan2 and 1/x lets me think that the standards tend to follow the results of one-sided limits. So, I’m surprised that pow and sqrt functions in IEEE754/C99 standards are treated in this unfettered way. That being said, I’m not involved at all in IEEE/C99 standards; that’s probably why I look at this from a pristine point of view. Provided that I accept the "axioms" of these standards, the explanations you both give are very convincing. I understand well that self-consistency is utmost important, maybe even above consistency with mathematical rules. Also, I concede that the standards are well-established and considerable efforts have been made to validate their different implementations (including Python). BTW, congratulations to you guys that made the effort to understand the standards and rigorously implementing them in Python! ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue32171> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com