[#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‐poing operations. == Synopsis Declared in `<bdldfp_decimalimputil.h>` [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_is_not_a_floating_point_literal`] | This `struct` is a helper type used to generate error messages for bad literals. |=== == Type Aliases [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bdldfp/DecimalImpUtil/ValueType128.adoc[`ValueType128`] | Alias for the 128‐bit raw decimal value type. | xref:BloombergLP/bdldfp/DecimalImpUtil/ValueType32.adoc[`ValueType32`] | Alias for the 32‐bit raw decimal value type. | xref:BloombergLP/bdldfp/DecimalImpUtil/ValueType64.adoc[`ValueType64`] | Alias for the 64‐bit raw decimal value type. |=== == Enums [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bdldfp/DecimalImpUtil/_04enum.adoc[`Unnamed enum`] | Status flag constants for decimal numeric operations. |=== == Static Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bdldfp/DecimalImpUtil/add-0ee.adoc[`add`] | `add` overloads | xref:BloombergLP/bdldfp/DecimalImpUtil/binaryToDecimal128-02.adoc[`binaryToDecimal128`] | `binaryToDecimal128` overloads | xref:BloombergLP/bdldfp/DecimalImpUtil/binaryToDecimal32-0c.adoc[`binaryToDecimal32`] | `binaryToDecimal32` overloads | xref:BloombergLP/bdldfp/DecimalImpUtil/binaryToDecimal64-09.adoc[`binaryToDecimal64`] | `binaryToDecimal64` overloads | xref:BloombergLP/bdldfp/DecimalImpUtil/ceil-0c.adoc[`ceil`] | `ceil` overloads | xref:BloombergLP/bdldfp/DecimalImpUtil/checkLiteral-0a.adoc[`checkLiteral`] | `checkLiteral` overloads | xref:BloombergLP/bdldfp/DecimalImpUtil/classify-07.adoc[`classify`] | `classify` overloads | xref:BloombergLP/bdldfp/DecimalImpUtil/convertBIDtoDPD-08.adoc[`convertBIDtoDPD`] | `convertBIDtoDPD` overloads | xref:BloombergLP/bdldfp/DecimalImpUtil/convertDPDtoBID-08.adoc[`convertDPDtoBID`] | `convertDPDtoBID` overloads | xref:BloombergLP/bdldfp/DecimalImpUtil/convertFromBID-0b4.adoc[`convertFromBID`] | `convertFromBID` overloads | xref:BloombergLP/bdldfp/DecimalImpUtil/convertToBID-0d.adoc[`convertToBID`] | `convertToBID` overloads | xref:BloombergLP/bdldfp/DecimalImpUtil/convertToDecimal128-0d.adoc[`convertToDecimal128`] | `convertToDecimal128` overloads | xref:BloombergLP/bdldfp/DecimalImpUtil/convertToDecimal32-0a4.adoc[`convertToDecimal32`] | `convertToDecimal32` overloads | xref:BloombergLP/bdldfp/DecimalImpUtil/convertToDecimal64-01.adoc[`convertToDecimal64`] | `convertToDecimal64` overloads | xref:BloombergLP/bdldfp/DecimalImpUtil/copySign-02.adoc[`copySign`] | `copySign` overloads | xref:BloombergLP/bdldfp/DecimalImpUtil/decompose-07.adoc[`decompose`] | `decompose` overloads | xref:BloombergLP/bdldfp/DecimalImpUtil/denormMin128.adoc[`denormMin128`] | Return the smallest positive denormalized value for the `ValueType128` type (IEEE‐754: +0.000000000000000000000000000000001e‐6143). | xref:BloombergLP/bdldfp/DecimalImpUtil/denormMin32.adoc[`denormMin32`] | Return the smallest positive denormalized value for the `ValueType32` type (IEEE‐754: +0.000001e‐95). | xref:BloombergLP/bdldfp/DecimalImpUtil/denormMin64.adoc[`denormMin64`] | Return the smallest positive denormalized value for the `ValueType64` type (IEEE‐754: +0.000000000000001e‐383). | xref:BloombergLP/bdldfp/DecimalImpUtil/divide-0c.adoc[`divide`] | `divide` overloads | xref:BloombergLP/bdldfp/DecimalImpUtil/epsilon128.adoc[`epsilon128`] | Return the difference between the least representable value of type `ValueType128` greater than 1 and 1 (IEEE‐754: +1e‐33). | xref:BloombergLP/bdldfp/DecimalImpUtil/epsilon32.adoc[`epsilon32`] | Return the difference between the least representable value of type `ValueType32` greater than 1 and 1 (IEEE‐754: +1e‐6). | xref:BloombergLP/bdldfp/DecimalImpUtil/epsilon64.adoc[`epsilon64`] | Return the difference between the least representable value of type `ValueType64` greater than 1 and 1 (IEEE‐754: +1e‐15). | xref:BloombergLP/bdldfp/DecimalImpUtil/equal-0e.adoc[`equal`] | `equal` overloads | xref:BloombergLP/bdldfp/DecimalImpUtil/exp-04.adoc[`exp`] | `exp` overloads | xref:BloombergLP/bdldfp/DecimalImpUtil/fabs-0e.adoc[`fabs`] | `fabs` overloads | xref:BloombergLP/bdldfp/DecimalImpUtil/floor-0c.adoc[`floor`] | `floor` overloads | xref:BloombergLP/bdldfp/DecimalImpUtil/fma-0e.adoc[`fma`] | `fma` overloads | xref:BloombergLP/bdldfp/DecimalImpUtil/fmod-06.adoc[`fmod`] | `fmod` overloads | xref:BloombergLP/bdldfp/DecimalImpUtil/format-0c.adoc[`format`] | `format` overloads | xref:BloombergLP/bdldfp/DecimalImpUtil/greater-0c.adoc[`greater`] | `greater` overloads | xref:BloombergLP/bdldfp/DecimalImpUtil/greaterEqual-01.adoc[`greaterEqual`] | `greaterEqual` overloads | xref:BloombergLP/bdldfp/DecimalImpUtil/infinity128.adoc[`infinity128`] | Return the value that represents positive infinity for the `ValueType128` type. | xref:BloombergLP/bdldfp/DecimalImpUtil/infinity32.adoc[`infinity32`] | Return the value that represents positive infinity for the `ValueType32` type. | xref:BloombergLP/bdldfp/DecimalImpUtil/infinity64.adoc[`infinity64`] | Return the value that represents positive infinity for the `ValueType64` type. | xref:BloombergLP/bdldfp/DecimalImpUtil/int32ToDecimal128.adoc[`int32ToDecimal128`] | Return a 128‐bit decimal representation of the specified integer. | xref:BloombergLP/bdldfp/DecimalImpUtil/int32ToDecimal32.adoc[`int32ToDecimal32`] | Return a 32‐bit decimal representation of the specified integer. | xref:BloombergLP/bdldfp/DecimalImpUtil/int32ToDecimal64.adoc[`int32ToDecimal64`] | Return a 64‐bit decimal representation of the specified `int` value. Return a 64‐bit decimal representation of the specified integer. | xref:BloombergLP/bdldfp/DecimalImpUtil/int64ToDecimal128.adoc[`int64ToDecimal128`] | Return a 128‐bit decimal representation of the specified 64‐bit integer. | xref:BloombergLP/bdldfp/DecimalImpUtil/int64ToDecimal32.adoc[`int64ToDecimal32`] | Return a 32‐bit decimal representation of the specified 64‐bit signed integer. | xref:BloombergLP/bdldfp/DecimalImpUtil/int64ToDecimal64.adoc[`int64ToDecimal64`] | Return a 64‐bit decimal representation of the specified `value`. | xref:BloombergLP/bdldfp/DecimalImpUtil/less-05.adoc[`less`] | `less` overloads | xref:BloombergLP/bdldfp/DecimalImpUtil/lessEqual-0f.adoc[`lessEqual`] | `lessEqual` overloads | xref:BloombergLP/bdldfp/DecimalImpUtil/llrint-085.adoc[`llrint`] | `llrint` overloads | xref:BloombergLP/bdldfp/DecimalImpUtil/log-09.adoc[`log`] | `log` overloads | xref:BloombergLP/bdldfp/DecimalImpUtil/log10-08.adoc[`log10`] | `log10` overloads | xref:BloombergLP/bdldfp/DecimalImpUtil/logB-042.adoc[`logB`] | `logB` overloads | xref:BloombergLP/bdldfp/DecimalImpUtil/lrint-0f.adoc[`lrint`] | Return `x` rounded to the nearest `long int`. | xref:BloombergLP/bdldfp/DecimalImpUtil/lround-0a.adoc[`lround`] | `lround` overloads | xref:BloombergLP/bdldfp/DecimalImpUtil/makeDecimal64-00a.adoc[`makeDecimal64`] | `makeDecimal64` overloads | xref:BloombergLP/bdldfp/DecimalImpUtil/makeDecimalRaw128-0c.adoc[`makeDecimalRaw128`] | `makeDecimalRaw128` overloads | xref:BloombergLP/bdldfp/DecimalImpUtil/makeDecimalRaw32.adoc[`makeDecimalRaw32`] | Create a `ValueType32` object representing a decimal floating point number consisting of the specified `significand` and `exponent`, with the sign given by `significand`. The behavior is undefined unless `abs(significand) <= 9,999,999` and `‐101 <= exponent <= 90`. | xref:BloombergLP/bdldfp/DecimalImpUtil/makeDecimalRaw64-0b.adoc[`makeDecimalRaw64`] | `makeDecimalRaw64` overloads | xref:BloombergLP/bdldfp/DecimalImpUtil/makeInfinity64.adoc[`makeInfinity64`] | Return a `ValueType64` representing infinity. Optionally specify whether the infinity `isNegative`. If `isNegative` is `false` or is is not supplied, the returned value will be infinity, and negative infinity otherwise. | xref:BloombergLP/bdldfp/DecimalImpUtil/max128.adoc[`max128`] | Return the largest number `ValueType128` can represent (IEEE‐754: +9.999999999999999999999999999999999e+6144). | xref:BloombergLP/bdldfp/DecimalImpUtil/max32.adoc[`max32`] | Return the largest number `ValueType32` can represent (IEEE‐754: +9.999999e+96). | xref:BloombergLP/bdldfp/DecimalImpUtil/max64.adoc[`max64`] | Return the largest number `ValueType64` can represent (IEEE‐754: +9.999999999999999e+384). | xref:BloombergLP/bdldfp/DecimalImpUtil/min128.adoc[`min128`] | Return the smallest positive normalized number `ValueType128` can represent (IEEE‐754: +1e‐6143). | xref:BloombergLP/bdldfp/DecimalImpUtil/min32.adoc[`min32`] | Return the smallest positive normalized number `ValueType32` can represent (IEEE‐754: +1e‐95). | xref:BloombergLP/bdldfp/DecimalImpUtil/min64.adoc[`min64`] | Return the smallest positive normalized number `ValueType64` can represent (IEEE‐754: +1e‐383). | xref:BloombergLP/bdldfp/DecimalImpUtil/multiply-0d.adoc[`multiply`] | `multiply` overloads | xref:BloombergLP/bdldfp/DecimalImpUtil/negate-04.adoc[`negate`] | `negate` overloads | xref:BloombergLP/bdldfp/DecimalImpUtil/nextafter-00.adoc[`nextafter`] | Return the next representable value after `from` toward `to`. | xref:BloombergLP/bdldfp/DecimalImpUtil/nexttoward-06.adoc[`nexttoward`] | `nexttoward` overloads | xref:BloombergLP/bdldfp/DecimalImpUtil/normalize-0d.adoc[`normalize`] | `normalize` overloads | xref:BloombergLP/bdldfp/DecimalImpUtil/notEqual-0c.adoc[`notEqual`] | `notEqual` overloads | xref:BloombergLP/bdldfp/DecimalImpUtil/parse128-00.adoc[`parse128`] | `parse128` overloads | xref:BloombergLP/bdldfp/DecimalImpUtil/parse32-05.adoc[`parse32`] | Parse a 32‐bit decimal value from the specified `input` string. | xref:BloombergLP/bdldfp/DecimalImpUtil/parse64-03.adoc[`parse64`] | Parse a 64‐bit decimal value from the specified `input` string. | xref:BloombergLP/bdldfp/DecimalImpUtil/pow-07.adoc[`pow`] | `pow` overloads | xref:BloombergLP/bdldfp/DecimalImpUtil/quantize-0e0.adoc[`quantize`] | `quantize` overloads | xref:BloombergLP/bdldfp/DecimalImpUtil/quantizeEqual-05.adoc[`quantizeEqual`] | `quantizeEqual` overloads | xref:BloombergLP/bdldfp/DecimalImpUtil/quietNaN128.adoc[`quietNaN128`] | Return a value that represents non‐signaling NaN for the `ValueType128` type. | xref:BloombergLP/bdldfp/DecimalImpUtil/quietNaN32.adoc[`quietNaN32`] | Return a value that represents non‐signaling NaN for the `ValueType32` type. | xref:BloombergLP/bdldfp/DecimalImpUtil/quietNaN64.adoc[`quietNaN64`] | Return a value that represents non‐signaling NaN for the `ValueType64` type. | xref:BloombergLP/bdldfp/DecimalImpUtil/remainder-04.adoc[`remainder`] | `remainder` overloads | 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. The actual value returned depends on the current decimal floating point rounding setting. | xref:BloombergLP/bdldfp/DecimalImpUtil/roundError32.adoc[`roundError32`] | Return the maximum rounding error for the `ValueType32` type. The actual value returned depends on the current decimal floating point rounding setting. | xref:BloombergLP/bdldfp/DecimalImpUtil/roundError64.adoc[`roundError64`] | Return the maximum rounding error for the `ValueType64` type. The actual value returned depends on the current decimal floating point rounding setting. | xref:BloombergLP/bdldfp/DecimalImpUtil/sameQuantum-0d7.adoc[`sameQuantum`] | `sameQuantum` overloads | xref:BloombergLP/bdldfp/DecimalImpUtil/scaleB-0a.adoc[`scaleB`] | `scaleB` overloads | xref:BloombergLP/bdldfp/DecimalImpUtil/signalingNaN128.adoc[`signalingNaN128`] | Return a value that represents signaling NaN for the `ValueType128` type. | xref:BloombergLP/bdldfp/DecimalImpUtil/signalingNaN32.adoc[`signalingNaN32`] | Return a value that represents signaling NaN for the `ValueType32` type. | xref:BloombergLP/bdldfp/DecimalImpUtil/signalingNaN64.adoc[`signalingNaN64`] | Return a value that represents signaling NaN for the `ValueType64` type. | xref:BloombergLP/bdldfp/DecimalImpUtil/sqrt-03.adoc[`sqrt`] | Return the square root of the specified `x`. | xref:BloombergLP/bdldfp/DecimalImpUtil/subtract-0e.adoc[`subtract`] | `subtract` overloads | xref:BloombergLP/bdldfp/DecimalImpUtil/trunc-02.adoc[`trunc`] | `trunc` overloads | xref:BloombergLP/bdldfp/DecimalImpUtil/uint32ToDecimal128.adoc[`uint32ToDecimal128`] | Return a 128‐bit decimal representation of the specified unsigned integer. | xref:BloombergLP/bdldfp/DecimalImpUtil/uint32ToDecimal32.adoc[`uint32ToDecimal32`] | Return a 32‐bit decimal representation of the specified unsigned integer. | xref:BloombergLP/bdldfp/DecimalImpUtil/uint32ToDecimal64.adoc[`uint32ToDecimal64`] | Return a 64‐bit decimal representation of the specified unsigned `int` value. | xref:BloombergLP/bdldfp/DecimalImpUtil/uint64ToDecimal128.adoc[`uint64ToDecimal128`] | Return a `Decimal128` object having the value closest to the specified `value` subject to the conversion rules as defined by IEEE‐754: | xref:BloombergLP/bdldfp/DecimalImpUtil/uint64ToDecimal32.adoc[`uint64ToDecimal32`] | Return a `Decimal32` object having the value closest to the specified `value` following the conversion rules as defined by IEEE‐754: | xref:BloombergLP/bdldfp/DecimalImpUtil/uint64ToDecimal64.adoc[`uint64ToDecimal64`] | Return a `Decimal64` object having the value closest to the specified `value` following the conversion rules as defined by IEEE‐754: |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#