[#mp_units-fma-0a] = xref:mp_units.adoc[mp_units]::fma :relfileprefix: ../ :mrdocs: Computes the fma of 2 quantities and a quantity point == Synopsis Declared in `<mp‐units/math.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< auto R, auto S, auto T, auto Origin, typename Rep1, typename Rep2, typename Rep3> requires requires { get_common_quantity_spec(get_quantity_spec(R) * get_quantity_spec(S), get_quantity_spec(T)); } && (equivalent(get_unit(R) * get_unit(S), get_unit(T))) && requires(Rep1 v1, Rep2 v2, Rep3 v3) { requires requires { fma(v1, v2, v3); } || requires { std::fma(v1, v2, v3); }; } [[nodiscard]] constexpr xref:mp_units/QuantityPointOf.adoc[QuantityPointOf<get_common_quantity_spec(get_quantity_spec(R) * get_quantity_spec(S), get_quantity_spec(T))>] auto fma( xref:mp_units/quantity-01.adoc[quantity<R, Rep1>] const& a, xref:mp_units/quantity-01.adoc[quantity<S, Rep2>] const& x, xref:mp_units/quantity_point-08.adoc[quantity_point<T, Origin, Rep3>] const& b) noexcept; ---- == Return Value QuantityPoint: The nearest floating point representable to ax+b == Parameters [cols=2] |=== | Name | Description | *a:* | Multiplicand | *x:* | Multiplicand | *b:* | Addend | *a* | A quantity | *x* | A quantity | *b* | A quantity point |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#