[issue11734] Add half-float (16-bit) support to struct module

Mark Dickinson report at bugs.python.org
Tue Aug 30 14:32:01 EDT 2016


Mark Dickinson added the comment:

Updated patch:
- Fix NaN packing behaviour.
- Expand documentation note on the half-precision format, with links to the wikipedia pages for IEEE 754 and for half-precision. (No direct link to IEEE 754 itself, since it isn't publicly available.)
- Use unpack_halffloat consistently; add pack_halffloat helper function.

If there's no further feedback, I'll apply this in the next day or two.

----------
Added file: http://bugs.python.org/file44281/cpython-struct-float16-v8.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue11734>
_______________________________________


More information about the Python-bugs-list mailing list