[Python-ideas] Adding a half-float (16-bit) type to PEP 3118 (and possibly the struct module?)

Mark Dickinson dickinsm at gmail.com
Wed Mar 30 22:05:25 CEST 2011

On Wed, Mar 30, 2011 at 8:53 PM, Robert Kern <robert.kern at gmail.com> wrote:
> Like Ellipsis, multidimensional extended slicing, complex numbers, and
> non-bool rich comparisons? :-)


(BTW, I didn't know that Python's complex numbers were NumPy
influenced:  thanks for that.)

> capably handled by the old buffer protocol. Still, it's worth defining the
> standard to allow third parties to communicate the full spectrum of things
> they want to tell each other.

Yes, that makes sense.  It's not very clear to me what the scope of
the Python additions would be.

[OT]: How is NumPy's float16 type implemented?  Is it clever enough to
do correct rounding for all basic arithmetic operations, or does it
suffer from the double-rounding problems that you'd get from (convert
operands to float64; do op in float64; round back to float16)?


More information about the Python-ideas mailing list