fma

Returns (x * y) + z, rounding only once according to the current rounding mode.

pragma(inline, true) @safe pure nothrow @nogc
real
fma
(
real x
,
real y
,
real z
)

Bugs

Not currently implemented - rounds twice.

Examples

assert(fma(0.0, 2.0, 2.0) == 2.0);
assert(fma(2.0, 2.0, 2.0) == 6.0);
assert(fma(real.infinity, 2.0, 2.0) == real.infinity);
assert(fma(real.nan, 2.0, 2.0) is real.nan);
assert(fma(2.0, 2.0, real.nan) is real.nan);

Meta