[#BloombergLP-bdldfp-DecimalUtil-nexttoward-08] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdldfp.adoc[bdldfp]::xref:BloombergLP/bdldfp/DecimalUtil.adoc[DecimalUtil]::nexttoward :relfileprefix: ../../../ :mrdocs: Return the next representable value of the specified `from` in the direction of the specified `to`. == Synopsis Declared in `<bdldfp_decimalutil.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static xref:BloombergLP/bdldfp/Decimal32.adoc[Decimal32] nexttoward( xref:BloombergLP/bdldfp/Decimal32.adoc[Decimal32] from, xref:BloombergLP/bdldfp/Decimal128.adoc[Decimal128] to); ---- == Description Special value handling: * If `from` equals `to`, `to` is returned. * If either argument is quiet NaN, quiet NaN is returned. * If either argument is signaling NaN, quiet NaN is returned and the value of the macro `EDOM` is stored into `errno`. * If `from` is finite, but the expected result is an infinity, infinity is returned and the value of the macro `ERANGE` is stored into `errno`. * If `from` does not equal `to` and the result is subnormal or zero, the value of the macro `ERANGE` is stored into `errno`. [.small]#Created with https://www.mrdocs.com[MrDocs]#