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

Robert Kern robert.kern at gmail.com
Thu Mar 31 18:36:30 CEST 2011


On 3/31/11 10:52 AM, Alexander Belopolsky wrote:

> BTW, what letter code is proposed for half-floats?  The only
> unassigned letter in the word "half" is 'a'.  Maybe it is time to
> extend struct and buffer format specification to include field
> bit-width?

The proposed letter code is 'e', as used in numpy. I'm not sure of the logic 
that went behind the choice, except perhaps that 'e' is near 'd' and 'f'. It's 
not too late to change, though. I don't know of any other group that has decided 
on such any kind of letter code for half-floats.

-- 
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
  that is made terrible by our own mad attempt to interpret it as though it had
  an underlying truth."
   -- Umberto Eco




More information about the Python-ideas mailing list