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

This `struct` provides a namespace for utility functions that implement core decimal floating&hyphen;poing operations&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
class DecimalImpUtil;
----

== Types

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bdldfp/DecimalImpUtil/This_is_not_a_floating_point_literal.adoc[`This&lowbar;is&lowbar;not&lowbar;a&lowbar;floating&lowbar;point&lowbar;literal`] 
| This `struct` is a helper type used to generate error messages for bad literals&period;
|===


== Type Aliases

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bdldfp/DecimalImpUtil/ValueType128.adoc[`ValueType128`] 
| 128&hyphen;bit raw decimal storage type&period;
| xref:BloombergLP/bdldfp/DecimalImpUtil/ValueType32.adoc[`ValueType32`] 
| 32&hyphen;bit raw decimal storage type&period;
| xref:BloombergLP/bdldfp/DecimalImpUtil/ValueType64.adoc[`ValueType64`] 
| 64&hyphen;bit raw decimal storage type&period;
|===


== Enums

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bdldfp/DecimalImpUtil/_04enum.adoc[`Unnamed enum`] 
| Status flags for decimal numeric operations&period;
|===


== Static Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bdldfp/DecimalImpUtil/add-0ee.adoc[`add`] 
| Return the sum of `lhs` and `rhs`&period;
| xref:BloombergLP/bdldfp/DecimalImpUtil/binaryToDecimal128-02.adoc[`binaryToDecimal128`] 
| Create a `Decimal128` closest to binary floating&hyphen;point `value`&period;
| xref:BloombergLP/bdldfp/DecimalImpUtil/binaryToDecimal32-0c.adoc[`binaryToDecimal32`] 
| Create a `Decimal32` closest to binary floating&hyphen;point `value`&period;
| xref:BloombergLP/bdldfp/DecimalImpUtil/binaryToDecimal64-09.adoc[`binaryToDecimal64`] 
| Create a `Decimal64` closest to binary floating&hyphen;point `value`&period;
| xref:BloombergLP/bdldfp/DecimalImpUtil/ceil-0c.adoc[`ceil`] 
| Return the smallest integral value not less than `x`&period;
| xref:BloombergLP/bdldfp/DecimalImpUtil/checkLiteral-0a.adoc[`checkLiteral`] 
| `checkLiteral` overloads
| xref:BloombergLP/bdldfp/DecimalImpUtil/classify-07.adoc[`classify`] 
| Return the floating&hyphen;point classification of `x`&period;
| xref:BloombergLP/bdldfp/DecimalImpUtil/convertBIDtoDPD-08.adoc[`convertBIDtoDPD`] 
| Convert `value` to Densely Packed Decimal (DPD) format&period;
| xref:BloombergLP/bdldfp/DecimalImpUtil/convertDPDtoBID-08.adoc[`convertDPDtoBID`] 
| Convert Densely Packed Decimal `dpd` to the implementation type&period;
| xref:BloombergLP/bdldfp/DecimalImpUtil/convertFromBID-0b4.adoc[`convertFromBID`] 
| Convert Binary Integral Decimal `bid` to the implementation type&period;
| xref:BloombergLP/bdldfp/DecimalImpUtil/convertToBID-0d.adoc[`convertToBID`] 
| Convert `value` to Binary Integral Decimal (BID) format&period;
| xref:BloombergLP/bdldfp/DecimalImpUtil/convertToDecimal128-0d.adoc[`convertToDecimal128`] 
| `convertToDecimal128` overloads
| xref:BloombergLP/bdldfp/DecimalImpUtil/convertToDecimal32-0a4.adoc[`convertToDecimal32`] 
| Convert `input` to the closest `ValueType32` value&period;
| xref:BloombergLP/bdldfp/DecimalImpUtil/convertToDecimal64-01.adoc[`convertToDecimal64`] 
| Convert `input` to the closest `ValueType64` value&period;
| xref:BloombergLP/bdldfp/DecimalImpUtil/copySign-02.adoc[`copySign`] 
| Return a value with the magnitude of `x` and the sign of `y`&period;
| xref:BloombergLP/bdldfp/DecimalImpUtil/decompose-07.adoc[`decompose`] 
| Decompose `value` into sign, significand, and exponent&period;
| xref:BloombergLP/bdldfp/DecimalImpUtil/denormMin128.adoc[`denormMin128`] 
| Return the smallest positive denormalized value for the `ValueType128` type (IEEE&hyphen;754&colon; &plus;0&period;000000000000000000000000000000001e&hyphen;6143)&period;
| xref:BloombergLP/bdldfp/DecimalImpUtil/denormMin32.adoc[`denormMin32`] 
| Return the smallest positive denormalized value for the `ValueType32` type (IEEE&hyphen;754&colon; &plus;0&period;000001e&hyphen;95)&period;
| xref:BloombergLP/bdldfp/DecimalImpUtil/denormMin64.adoc[`denormMin64`] 
| Return the smallest positive denormalized value for the `ValueType64` type (IEEE&hyphen;754&colon; &plus;0&period;000000000000001e&hyphen;383)&period;
| xref:BloombergLP/bdldfp/DecimalImpUtil/divide-0c.adoc[`divide`] 
| Return the quotient of `lhs` divided by `rhs`&period;
| xref:BloombergLP/bdldfp/DecimalImpUtil/epsilon128.adoc[`epsilon128`] 
| Return the difference between the least representable value of type `ValueType128` greater than 1 and 1 (IEEE&hyphen;754&colon; &plus;1e&hyphen;33)&period;
| xref:BloombergLP/bdldfp/DecimalImpUtil/epsilon32.adoc[`epsilon32`] 
| Return the difference between the least representable value of type `ValueType32` greater than 1 and 1 (IEEE&hyphen;754&colon; &plus;1e&hyphen;6)&period;
| xref:BloombergLP/bdldfp/DecimalImpUtil/epsilon64.adoc[`epsilon64`] 
| Return the difference between the least representable value of type `ValueType64` greater than 1 and 1 (IEEE&hyphen;754&colon; &plus;1e&hyphen;15)&period;
| xref:BloombergLP/bdldfp/DecimalImpUtil/equal-0e.adoc[`equal`] 
| Return `true` if `lhs` and `rhs` have the same value&period;
| xref:BloombergLP/bdldfp/DecimalImpUtil/exp-04.adoc[`exp`] 
| Return `e` raised to the power `x`&period;
| xref:BloombergLP/bdldfp/DecimalImpUtil/fabs-0e.adoc[`fabs`] 
| Return the absolute value of `x`&period;
| xref:BloombergLP/bdldfp/DecimalImpUtil/floor-0c.adoc[`floor`] 
| Return the largest integral value not greater than `x`&period;
| xref:BloombergLP/bdldfp/DecimalImpUtil/fma-0e.adoc[`fma`] 
| Return `x &ast; y &plus; z`, rounded as one ternary operation&period;
| xref:BloombergLP/bdldfp/DecimalImpUtil/fmod-06.adoc[`fmod`] 
| Return the floating&hyphen;point remainder of `x` divided by `y`&period;
| xref:BloombergLP/bdldfp/DecimalImpUtil/format-0c.adoc[`format`] 
| Format `value` into `buffer` using `cfg`&period;
| xref:BloombergLP/bdldfp/DecimalImpUtil/greater-0c.adoc[`greater`] 
| Return `true` if `lhs` is greater than `rhs`&period;
| xref:BloombergLP/bdldfp/DecimalImpUtil/greaterEqual-01.adoc[`greaterEqual`] 
| Return `true` if `lhs` is greater than or equal to `rhs`&period;
| xref:BloombergLP/bdldfp/DecimalImpUtil/infinity128.adoc[`infinity128`] 
| Return the value that represents positive infinity for the `ValueType128` type&period;
| xref:BloombergLP/bdldfp/DecimalImpUtil/infinity32.adoc[`infinity32`] 
| Return the value that represents positive infinity for the `ValueType32` type&period;
| xref:BloombergLP/bdldfp/DecimalImpUtil/infinity64.adoc[`infinity64`] 
| Return the value that represents positive infinity for the `ValueType64` type&period;
| xref:BloombergLP/bdldfp/DecimalImpUtil/int32ToDecimal128.adoc[`int32ToDecimal128`] 
| Return a `Decimal128` representation of `value`&period;
| xref:BloombergLP/bdldfp/DecimalImpUtil/int32ToDecimal32.adoc[`int32ToDecimal32`] 
| Return a `Decimal32` representation of `value`&period;
| xref:BloombergLP/bdldfp/DecimalImpUtil/int32ToDecimal64.adoc[`int32ToDecimal64`] 
| Return a `Decimal64` representation of `value`&period;
| xref:BloombergLP/bdldfp/DecimalImpUtil/int64ToDecimal128.adoc[`int64ToDecimal128`] 
| Return a `Decimal128` representation of `value`&period;
| xref:BloombergLP/bdldfp/DecimalImpUtil/int64ToDecimal32.adoc[`int64ToDecimal32`] 
| Return a `Decimal32` representation of `value`&period;
| xref:BloombergLP/bdldfp/DecimalImpUtil/int64ToDecimal64.adoc[`int64ToDecimal64`] 
| Return a `Decimal64` representation of `value`&period;
| xref:BloombergLP/bdldfp/DecimalImpUtil/less-05.adoc[`less`] 
| Return `true` if `lhs` is less than `rhs`&period;
| xref:BloombergLP/bdldfp/DecimalImpUtil/lessEqual-0f.adoc[`lessEqual`] 
| Return `true` if `lhs` is less than or equal to `rhs`&period;
| xref:BloombergLP/bdldfp/DecimalImpUtil/llrint-085.adoc[`llrint`] 
| Return `x` rounded to the nearest `long long int`&period;
| xref:BloombergLP/bdldfp/DecimalImpUtil/log-09.adoc[`log`] 
| Return the natural logarithm of `x`&period;
| xref:BloombergLP/bdldfp/DecimalImpUtil/log10-08.adoc[`log10`] 
| Return the common (base&hyphen;10) logarithm of `x`&period;
| xref:BloombergLP/bdldfp/DecimalImpUtil/logB-042.adoc[`logB`] 
| Return the radix&hyphen;based logarithm of the absolute value of `x`&period;
| xref:BloombergLP/bdldfp/DecimalImpUtil/lrint-0f.adoc[`lrint`] 
| Return `x` rounded to the nearest `long int` using the current mode&period;
| xref:BloombergLP/bdldfp/DecimalImpUtil/lround-0a.adoc[`lround`] 
| Return `x` rounded to the nearest `long int`&period;
| xref:BloombergLP/bdldfp/DecimalImpUtil/makeDecimal64-00a.adoc[`makeDecimal64`] 
| Return a `Decimal64` with the given significand and exponent&period;
| xref:BloombergLP/bdldfp/DecimalImpUtil/makeDecimalRaw128-0c.adoc[`makeDecimalRaw128`] 
| Create a `ValueType128` from `significand` and `exponent`&period;
| xref:BloombergLP/bdldfp/DecimalImpUtil/makeDecimalRaw32.adoc[`makeDecimalRaw32`] 
| Create a `ValueType32` from `significand` and `exponent`&period;
| xref:BloombergLP/bdldfp/DecimalImpUtil/makeDecimalRaw64-0b.adoc[`makeDecimalRaw64`] 
| Create a `ValueType64` from `significand` and `exponent`&period;
| xref:BloombergLP/bdldfp/DecimalImpUtil/makeInfinity64.adoc[`makeInfinity64`] 
| Return a `ValueType64` representing positive or negative infinity&period;
| xref:BloombergLP/bdldfp/DecimalImpUtil/max128.adoc[`max128`] 
| Return the largest number `ValueType128` can represent (IEEE&hyphen;754&colon; &plus;9&period;999999999999999999999999999999999e&plus;6144)&period;
| xref:BloombergLP/bdldfp/DecimalImpUtil/max32.adoc[`max32`] 
| Return the largest number `ValueType32` can represent (IEEE&hyphen;754&colon; &plus;9&period;999999e&plus;96)&period;
| xref:BloombergLP/bdldfp/DecimalImpUtil/max64.adoc[`max64`] 
| Return the largest number `ValueType64` can represent (IEEE&hyphen;754&colon; &plus;9&period;999999999999999e&plus;384)&period;
| xref:BloombergLP/bdldfp/DecimalImpUtil/min128.adoc[`min128`] 
| Return the smallest positive normalized number `ValueType128` can represent (IEEE&hyphen;754&colon; &plus;1e&hyphen;6143)&period;
| xref:BloombergLP/bdldfp/DecimalImpUtil/min32.adoc[`min32`] 
| Return the smallest positive normalized number `ValueType32` can represent (IEEE&hyphen;754&colon; &plus;1e&hyphen;95)&period;
| xref:BloombergLP/bdldfp/DecimalImpUtil/min64.adoc[`min64`] 
| Return the smallest positive normalized number `ValueType64` can represent (IEEE&hyphen;754&colon; &plus;1e&hyphen;383)&period;
| xref:BloombergLP/bdldfp/DecimalImpUtil/multiply-0d.adoc[`multiply`] 
| Return the product of `lhs` and `rhs`&period;
| xref:BloombergLP/bdldfp/DecimalImpUtil/negate-04.adoc[`negate`] 
| Return the negation of `value`&period;
| xref:BloombergLP/bdldfp/DecimalImpUtil/nextafter-00.adoc[`nextafter`] 
| Return the next representable value after `from` toward `to`&period;
| xref:BloombergLP/bdldfp/DecimalImpUtil/nexttoward-06.adoc[`nexttoward`] 
| Return the next representable value after `from` toward `to`&period;
| xref:BloombergLP/bdldfp/DecimalImpUtil/normalize-0d.adoc[`normalize`] 
| Return `original` with a normalized significand and exponent&period;
| xref:BloombergLP/bdldfp/DecimalImpUtil/notEqual-0c.adoc[`notEqual`] 
| Return `true` if `lhs` and `rhs` do not have the same value&period;
| xref:BloombergLP/bdldfp/DecimalImpUtil/parse128-00.adoc[`parse128`] 
| `parse128` overloads
| xref:BloombergLP/bdldfp/DecimalImpUtil/parse32-05.adoc[`parse32`] 
| `parse32` overloads
| xref:BloombergLP/bdldfp/DecimalImpUtil/parse64-03.adoc[`parse64`] 
| `parse64` overloads
| xref:BloombergLP/bdldfp/DecimalImpUtil/pow-07.adoc[`pow`] 
| Return `base` raised to the power `exp`&period;
| xref:BloombergLP/bdldfp/DecimalImpUtil/quantize-0e0.adoc[`quantize`] 
| `quantize` overloads
| xref:BloombergLP/bdldfp/DecimalImpUtil/quantizeEqual-05.adoc[`quantizeEqual`] 
| Quantize `y` to `exponent` into `x` when exactly representable&period;
| xref:BloombergLP/bdldfp/DecimalImpUtil/quietNaN128.adoc[`quietNaN128`] 
| Return a value that represents non&hyphen;signaling NaN for the `ValueType128` type&period;
| xref:BloombergLP/bdldfp/DecimalImpUtil/quietNaN32.adoc[`quietNaN32`] 
| Return a value that represents non&hyphen;signaling NaN for the `ValueType32` type&period;
| xref:BloombergLP/bdldfp/DecimalImpUtil/quietNaN64.adoc[`quietNaN64`] 
| Return a value that represents non&hyphen;signaling NaN for the `ValueType64` type&period;
| xref:BloombergLP/bdldfp/DecimalImpUtil/remainder-04.adoc[`remainder`] 
| Return the IEEE remainder of `x` divided by `y`&period;
| xref:BloombergLP/bdldfp/DecimalImpUtil/round-0f.adoc[`round`] 
| `round` overloads
| xref:BloombergLP/bdldfp/DecimalImpUtil/roundError128.adoc[`roundError128`] 
| Return the maximum rounding error for the `ValueType128` type&period; The actual value returned depends on the current decimal floating point rounding setting&period;
| xref:BloombergLP/bdldfp/DecimalImpUtil/roundError32.adoc[`roundError32`] 
| Return the maximum rounding error for the `ValueType32` type&period; The actual value returned depends on the current decimal floating point rounding setting&period;
| xref:BloombergLP/bdldfp/DecimalImpUtil/roundError64.adoc[`roundError64`] 
| Return the maximum rounding error for the `ValueType64` type&period; The actual value returned depends on the current decimal floating point rounding setting&period;
| xref:BloombergLP/bdldfp/DecimalImpUtil/sameQuantum-0d7.adoc[`sameQuantum`] 
| Return `true` if `x` and `y` have the same quantum exponents&period;
| xref:BloombergLP/bdldfp/DecimalImpUtil/scaleB-0a.adoc[`scaleB`] 
| Return `value` multiplied by ten raised to `exponent`&period;
| xref:BloombergLP/bdldfp/DecimalImpUtil/signalingNaN128.adoc[`signalingNaN128`] 
| Return a value that represents signaling NaN for the `ValueType128` type&period;
| xref:BloombergLP/bdldfp/DecimalImpUtil/signalingNaN32.adoc[`signalingNaN32`] 
| Return a value that represents signaling NaN for the `ValueType32` type&period;
| xref:BloombergLP/bdldfp/DecimalImpUtil/signalingNaN64.adoc[`signalingNaN64`] 
| Return a value that represents signaling NaN for the `ValueType64` type&period;
| xref:BloombergLP/bdldfp/DecimalImpUtil/sqrt-03.adoc[`sqrt`] 
| Return the square root of `x`&period;
| xref:BloombergLP/bdldfp/DecimalImpUtil/subtract-0e.adoc[`subtract`] 
| Return the difference of `lhs` and `rhs`&period;
| xref:BloombergLP/bdldfp/DecimalImpUtil/trunc-02.adoc[`trunc`] 
| Return `x` rounded toward zero to an integral value&period;
| xref:BloombergLP/bdldfp/DecimalImpUtil/uint32ToDecimal128.adoc[`uint32ToDecimal128`] 
| Return a `Decimal128` representation of `value`&period;
| xref:BloombergLP/bdldfp/DecimalImpUtil/uint32ToDecimal32.adoc[`uint32ToDecimal32`] 
| Return a `Decimal32` representation of `value`&period;
| xref:BloombergLP/bdldfp/DecimalImpUtil/uint32ToDecimal64.adoc[`uint32ToDecimal64`] 
| Return a `Decimal64` representation of `value`&period;
| xref:BloombergLP/bdldfp/DecimalImpUtil/uint64ToDecimal128.adoc[`uint64ToDecimal128`] 
| Return a `Decimal128` representation of `value`&period;
| xref:BloombergLP/bdldfp/DecimalImpUtil/uint64ToDecimal32.adoc[`uint64ToDecimal32`] 
| Return a `Decimal32` representation of `value`&period;
| xref:BloombergLP/bdldfp/DecimalImpUtil/uint64ToDecimal64.adoc[`uint64ToDecimal64`] 
| Return a `Decimal64` representation of `value`&period;
|===



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