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

Return the IEEE remainder of `x` divided by `y`&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]
remainder(
    xref:BloombergLP/bdldfp/DecimalImpUtil/ValueType32.adoc[ValueType32] x,
    xref:BloombergLP/bdldfp/DecimalImpUtil/ValueType32.adoc[ValueType32] y);
----

== Description

Return the remainder of the division of the specified `x` by the specified `y`&period; The remainder of the division operation `x&sol;y` calculated by this function is exactly the value `x &hyphen; n&ast;y`, where `n` s the integral value nearest the exact value `x&sol;y`&period; When `&verbar;n &hyphen; x&sol;y&verbar; &equals;&equals; 0&period;5`, the value `n` is chosen to be even&period; Note that in contrast to `DecimalImpUtil&colon;&colon;fmod()`, the returned value is not guaranteed to have the same sign as `x`&period;

Special value handling&colon; &ast; The current rounding mode has no effect&period; &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 `y` is &plus;&sol;&hyphen;0, 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 finite and `y` is &plus;&sol;&hyphen;infnity, `x` is returned&period;

== Return Value

the IEEE remainder of `x` divided by `y`

== Parameters

[cols="1,4"]
|===
| Name| Description
| *x*
| dividend
| *y*
| divisor
|===


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