Mark Dickinson added the comment: Refreshed patch, with a few minor updates:
- Use copysign instead of signbit (we don't currently check for signbit in the configure scripts); only check for negative zero when we've already checked equality with 0.0. - Use Py_IS_NAN and Py_IS_INFINITY instead of isinf and isnan. - Add an extra check for really tiny numbers in _PyFloat_Pack2 to avoid binary64 subnormals in intermediate calculations. - Remove a duplicate check for the case x == 0.0 in _PyFloat_Pack2. - Make unpacking of ints and nans behave in the same way as float("inf") or float("nan"): use _Py_dg_infinity and _Py_dg_stdnan if available, else fall back to Py_HUGE_VAL and Py_NAN. - Minor style nits (braces; use floating-point constants when comparing with floats; consistent capitalization for hex literals, etc.) ---------- Added file: http://bugs.python.org/file30145/cpython-struct-float16-v6.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue11734> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com