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

Return the next representable value of the specified `from` in the direction of the specified `to`&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]
nexttoward(
    xref:BloombergLP/bdldfp/DecimalImpUtil/ValueType32.adoc[ValueType32] from,
    xref:BloombergLP/bdldfp/DecimalImpUtil/ValueType128.adoc[ValueType128] to);
----

== Description

Special value handling&colon; &ast; If `from` equals `to`, `to` is returned&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 `from` is finite, but the expected result is infinity, infinity is returned and the value of the macro `ERANGE` is stored into `errno`&period; &ast; If `from` does not equal `to` and the result is subnormal or zero, the value of the macro `ERANGE` is stored into `errno`&period;


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