[#mp_units-fmod]
= xref:mp_units.adoc[mp&lowbar;units]::fmod
:relfileprefix: ../
:mrdocs:

Computes the floating&hyphen;point remainder of the division operation x &sol; y&period;

== Synopsis

Declared in `&lt;mp&hyphen;units&sol;math&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    auto R1,
    typename Rep1,
    auto R2,
    typename Rep2&gt;
requires requires(Rep1 v1, Rep2 v2) &lcub;
    get&lowbar;common&lowbar;reference(R1, R2)&semi;
    requires requires &lcub; fmod(v1, v2)&semi; &rcub;
&num;if MP&lowbar;UNITS&lowbar;HOSTED
               &verbar;&verbar; requires &lcub; std&colon;&colon;fmod(v1, v2)&semi; &rcub;
&num;endif
               &semi;
  &rcub;
&lsqb;&lsqb;nodiscard&rsqb;&rsqb;
constexpr
xref:mp_units/QuantityOf.adoc[QuantityOf&lt;get&lowbar;quantity&lowbar;spec(R1)&gt;] auto
fmod(
    xref:mp_units/quantity-01.adoc[quantity&lt;R1, Rep1&gt;] const& x,
    xref:mp_units/quantity-01.adoc[quantity&lt;R2, Rep2&gt;] const& y) noexcept;
----

== Return Value

[NOTE]
====
The return value https://en.cppreference.com/cpp/language/attributes/nodiscard[should not be discarded^].
====
== Parameters

[cols="1,4"]
|===
| Name| Description
| *x*
| A quantity
| *y*
| A quantity
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
