The Decimal value type represents decimal numbers ranging from
positive 79,228,162,514,264,337,593,543,950,335 to negative
79,228,162,514,264,337,593,543,950,335. The Decimal value type is
appropriate for financial calculations requiring large numbers of significant
integral and fractional digits and no round-off errors.
A decimal number is a floating-point value that consists of a sign, a numeric
value where each digit in the value ranges from 0 to 9, and a scaling factor
that indicates the position of a floating decimal point that separates the
integral and fractional parts of the numeric value.
The binary representation of a Decimal value consists of a 1-bit sign,
a 96-bit integer number, and a scaling factor used to divide the 96-bit integer
and specify what portion of it is a decimal fraction. The scaling factor is
implicitly the number 10, raised to an exponent ranging from 0 to 28. Therefore,
the binary representation of a Decimal value is of the form,
((-296 to 296) / 10(0 to 28)), where
-296-1 is equal to MinValue, and 296-1 is
equal to MaxValue. |