Jeff Allen added the comment:
Ah, cunning: I can make sense of it in hex.
>>> hex(to_ulps(expected))
'0x3ff0000000000000'
>>> hex(to_ulps(got))
'0x3feffffffffffffc'
>>> hex( to_ulps(got) - to_ulps(expected) )
'-0x4'
... and what you've done with ulp then follows.
In my version a format like "{:d} ulps" was a bad idea when the error was a
gross one, but your to_ulps is only piece-wise linear -- large differences are
compressed.
I'm pleased my work has mostly survived: here's hoping the house build-bots
agree. erfc() is perhaps the last worry, but math & cmath pass on my machine.
----------
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue26040>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com