Everything

fma / fmaf / fmal


Calculates (d1 * d2) + d3 as a single ternary operation.

[Format]

#include <math.h>

double fma(double d1, double d2, double d3);

float fmaf(float d1, float d2, float d3);

long double fmal(long double d1, long double d2, long double d3);

[Parameters]

d1, d2, d3 Floating-point values

[Return values]

Result of (d1 * d2) + d3 calculated as ternary operation

[Remarks]

The fma function group performs calculation as if infinite precision is available and rounds the result only one time in the rounding mode indicated by FLT_ROUNDS.