28.2.29 __builtin_fma

Description

__builtin_fma computes (x * y) + z as if with unlimited range and precision, rounding only once to the result format. This can provide more accurate results than performing the multiplication and addition separately, especially with floating-point numbers. This function operates on 64-bit, double-precision floating-point numbers. For more information, see 9.3 Floating-Point Data Types.

Prototype

double __builtin_fma(double x, double y, double z);

Arguments

x - value to be multiplied by the multiplier

y - value of multiplier

z - value to added to the result of the multiplication

Return Value

Returns value of the mathematical and rounding operations. See also 4.3.4.1 Why Are My Floating-Point Results Not Quite What I Am Expecting?

Machine Instruction

mac.d

Error Messages

An error message is reported if there is a floating-point exception.