[#BloombergLP-bdldfp-DecimalImpUtil_IntelDfp-uint64ToDecimal128]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdldfp.adoc[bdldfp]::xref:BloombergLP/bdldfp/DecimalImpUtil_IntelDfp.adoc[DecimalImpUtil&lowbar;IntelDfp]::uint64ToDecimal128
:relfileprefix: ../../../
:mrdocs:

Return the 128&hyphen;bit decimal value closest to an unsigned 64&hyphen;bit integer&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
xref:BloombergLP/bdldfp/DecimalImpUtil_IntelDfp/ValueType128.adoc[DecimalImpUtil&lowbar;IntelDfp::ValueType128]
uint64ToDecimal128(unsigned long long value);
----

== Description

Return a `Decimal128` object having the value closest to the specified `value` subject to the conversion rules as defined by IEEE&hyphen;754&colon;

&ast; If `value` is zero then initialize this object to a zero with an unspecified sign and an unspecified exponent&period; &ast; Otherwise if `value` has a value that is not exactly representable using `std&colon;&colon;numeric&lowbar;limits&lt;Decimal128&gt;&colon;&colon;max&lowbar;digit` decimal digits then return `value` rounded according to the rounding direction&period; &ast; Otherwise initialize this object to `value`&period;

The exponent 0 (quantum 1e&hyphen;33) is preferred during conversion unless it would cause unnecessary loss of precision&period;

== Return Value

closest 128&hyphen;bit decimal representation of `value`

== Parameters

[cols="1,4"]
|===
| Name| Description
| *value*
| unsigned 64&hyphen;bit integer value to convert
|===


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