The Decimal constructor allows you to create a new Decimal object based on a value:
Decimal(value='0', context=None)
The value argument can be an integer, string, tuple, float, or another Decimal object. If you don’t provide the value argument, it defaults to '0'.
Tuple
(sign, (digit1,digit2, digit3,...), exponent)
For example:
3.14 = 314 x 10^-2
The tuple has three elements as follows:
sign is 0
digits is (3,1,4)
exponent is -2
Float
When you use a float that doesn’t have an exact binary float representation, the Decimal constructor cannot create an accurate decimal representation. #