2.1.1.7 Decimal

The Decimal represents a decimal value. It has the following format.


0


1


2


3


4


5


6


7


8


9

1
0


1


2


3


4


5


6


7


8


9

2
0


1


2


3


4


5


6


7


8


9

3
0


1

Value (variable)

...

Value (variable): A LengthPrefixedString value that is the string representation of the decimal value. The string MUST be of the following format.

 Formats for decimal value

 Value

=

 0*1(MINUS)IntegralPart 0*1(FractionalPart)

 IntegralPart

=

 1*(DIGIT)

 FractionalPart

=

 DECIMALPOINT 1*(DIGIT)

 MINUS

=

'-'

 DECIMALPOINT

=

'.'

The decimal value ranges from positive 79,228,162,514,264,337,593,543,950,335 to negative 79,228,162,514,264,337,593,543,950,335 inclusive.

When reading this value, if all of the following are true:

  • The string has more than 29 digits, including both the IntegralPart and the FractionalPart.

  • The net value is within the decimal value range.

  • The number of digits in the Integral part is less than or equal to 29.

then the decimal value MUST be rounded to the nearest value such that the total number of digits is 29.

Show: