So far, you have seen a couple of functions that takes argument as input or output single-precision or double-precision floating-point values. Given a floating-point value x, the OpenCL floating-point functions provide you with the capability to extract the mantissa and exponent from x via
frexp(), decompose x via
modf(), compute the next largest/smallest single-precision floating-point value via
nextafter(), and others. Considering that there are so many useful floating-point functions, there are two functions which are important to understand because it's very common in OpenCL code. They are the
fma() functions which is Multiply-Add and Fused Multiply-Add instruction respectively.
The Multiply-Add (MAD ...