NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

7.2.1 Decimal

Decimal is an 12-byte data type suitable for financial and monetary calculations. The decimal type can represent values ranging from 1.0 × 10-28 to approximately 7.9 × 1028 with 28-29 significant digits. The finite set of values of type decimal are of the form s × m × 10e, where s is 1 or –1, 0 = m < 296, and -28 = e = 0. A decimal is represented as a 6-byte integer scaled by a power of ten.

Operations on values of type decimal are exact to 28 or 29 digits, but to no more than 28 decimal places. Results are rounded to the nearest representable value, and, when a result is equally close to two representable values, to the value that has an even number in the least significant digit position.