[cfe-commits] RFC: Half floating point support

Jonathan Sauer jonathan.sauer at gmx.de
Thu Oct 6 07:44:36 PDT 2011


>> FWIW, the IEEE 754-2008 standard specifies 16 bit floating point numbers (referred to as "binary16").
>> According to <http://en.wikipedia.org/wiki/Half_precision>:
>> | It is intended for storage (of many floating point values where higher precision need not be stored),
>> | not for performing arithmetic computations.
> Right. The main problem is how we now define "storage only type" in C / C++ :)

When in an arithmetic context, automatic promotion to some implementation-defined floating-point type
that has at least binary16's accuracy, I would propose. Just like integer calculations are always performed
on at least int (I sure hope I remember this correctly ;-).

This floating-point type could be whatever is best for the platform.


More information about the cfe-commits mailing list