On Apr 22, 5:46*pm, "Dann Corbit" <dcor...@connx.comwrote:
*The half float size has no value unless
there is hardware support for it, since float will be about the same speed
and packing and unpacking the little 16-bit buggers and doing your own
software math with them would defeat the whole purpose without hardware
support.
Unless, of course, you have to store a whole lot of them, and you find
the precision and speed to size tradeoff to be worthwhile. And since
the OP didn't specify his performance requirements...
OTOH, in response to the OP's question, any such type would have to be
supported as an extension, it could not be one of the standard types.
In C++ you could create a half_float class easily enough, you’d need
to do little more than supply conversion operators.