Enables the use of half-precision floating-point numbers as an optional extension to the VFPv3 architecture. If a format is not specified, use of the __fp16 data type is faulted by the compiler.
is one of:
An alternative to
ieeethat provides additional range, but has no NaN or infinity values.
Half-precision binary floating-point format defined by IEEE 754r, a revision to the IEEE 754 standard.
This is the default setting. It is equivalent to not specifying a format and means that the compiler faults use of the
The following restrictions apply when you use the
__fp16 data type:
When used in a C or C++ expression, an
__fp16type is promoted to single precision. Subsequent promotion to double precision can occur if required by one of the operands.
A single precision value can be converted to
__fp16. A double precision value is converted to single precision and then to
__fp16, that could involve double rounding. This reflects the lack of direct double-to-16-bit conversion in the ARM architecture.
fpmode=fast, no floating-point exceptions are raised when converting to and from half-precision floating-point format.
Function formal arguments cannot be of type
__fp16. However, pointers to variables of type
__fp16can be used as function formal argument types.
__fp16values can be passed as actual function arguments. In this case, they are converted to single-precision values.
__fp16cannot be specified as the return type of a function. However, a pointer to an
__fp16type can be used as a return type.
__fp16value is converted to a single-precision or double-precision value when used as a return value for a function that returns a