Eli Stevens <wickedg...@gmail.com> added the comment:

Made the _PyFloat_Pack2 match the algo in _PyFloat_Pack4, and did similar for 
Unpack.  This should work on platforms that don't have IEEE 754 floats except 
for situations where an INF or NAN is unpacked (this is the same as the Unpack4 
behavior).

This also gets rid of any need for #ifdef'd code (an ad-hoc speed test showed 
no noticeable difference between the numpy-based version and the CPython-based 
version of the functions).

I've also added a bit of documentation to this version, as well as more tests.

I haven't changed anything about the native_table entry or Pack4's 
non-round-to-even behavior.

----------
Added file: http://bugs.python.org/file21540/cpython-struct-float16-v4.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

Reply via email to