Decompose the specified decimal value into the components of the decimal floating‐point format and load the result into the specified sign, significand and exponent such that value is equal to sign * significand * (10 ** exponent). The special values infinity and NaNs are decomposed to sign, exponent and significand parts, even though they don't have their normal meaning (except sign). That is those specific values cannot be restored using these parts, unlike the finite ones. Return the integer value that represents the floating point classification of the specified value as follows:
Synopsis
Declared in <bdldfp_decimalimputil.h>
static
int
decompose(
int* sign,
unsigned int* significand,
int* exponent,
ValueType32 value);
Description
* if value is NaN, return FP_NAN; * if value is infinity, return FP_INFINITE; * if value is a subnormal value, return FP_SUBNORMAL; * if value is a zero value, return FP_ZERO; * otherwise return FP_NORMAL.
Note that a decomposed representation may not be unique, for example 10 can be represented as either 10 * (10 ** 0) or 1 * (10 ** 1). The returned significand and exponent reflect the encoded representation of value (i.e., they reflect the quantum of value). Decompose the specified decimal value into sign, exponent, and coefficient.
Created with MrDocs