[issue39396] AIX: self.assertEqualSign(math.nextafter(-0.0, +0.0), +0.0) test fails on AIX

Mark Dickinson report at bugs.python.org
Mon Jan 20 14:21:14 EST 2020


Mark Dickinson <dickinsm at gmail.com> added the comment:

> Mark: what's your call on that one?

I don't know. It's a hard problem in general: where do we draw the line between simply wrapping the platform libm, bugs and all, on one hand and trying to abstract away platform differences and make guarantees about corner-case behaviour on the other.

For this particular case, I'd be fine with adding a special case for `x == y` in the code (suitably commented to explain why the special case is there, and under what conditions it can be removed). But I fear it's the thin end of the wedge: as Michael's last message shows, to get the test suite to pass on his particular flavour of AIX, we'd need to add a special case for cmath.exp, too, and there may be more failures once that's fixed.

Actually, the cmath.exp failure looks a little odd to my eyes: it would be a bit surprising to have cmath.exp fail if all of test_math passed. I suspect a dodgy compiler optimisation. But that's another issue.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue39396>
_______________________________________


More information about the Python-bugs-list mailing list