[#BloombergLP-bdldfp-DecimalImpUtil-fmod-09]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdldfp.adoc[bdldfp]::xref:BloombergLP/bdldfp/DecimalImpUtil.adoc[DecimalImpUtil]::fmod
:relfileprefix: ../../../
:mrdocs:

Return the remainder of the division of the specified `x` by the specified `y`&period; The returned value has the same sign as `x` and is less than `y` in magnitude&period;

== Synopsis

Declared in `&lt;bdldfp&lowbar;decimalimputil&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
xref:BloombergLP/bdldfp/DecimalImpUtil/ValueType32.adoc[DecimalImpUtil::ValueType32]
fmod(
    xref:BloombergLP/bdldfp/DecimalImpUtil/ValueType32.adoc[ValueType32] x,
    xref:BloombergLP/bdldfp/DecimalImpUtil/ValueType32.adoc[ValueType32] y);
----

== Description

Special value handling&colon; &ast; If either argument is quiet NaN, quiet NaN is returned&period; &ast; If either argument is signaling NaN, quiet NaN is returned, and the value of the macro `EDOM` is stored into `errno`&period; &ast; If `x` is &plus;&sol;&hyphen;infnity and `y` is not NaN, quiet NaN is returned and the value of the macro `EDOM` is stored into `errno`&period; &ast; If `x` is &plus;&sol;&hyphen;0 and `y` is not zero, &plus;&sol;&hyphen;0 is returned&period; &ast; If `y` is &plus;&sol;&hyphen;0, quite NaN is returned and the value of the macro `EDOM` is stored into `errno`&period; &ast; If `x` is finite and `y` is &plus;&sol;&hyphen;infnity, `x` is returned&period;


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