Decimal Floating Point Arithmetic : Decimal : Data Type PYTHON examples


PYTHON examples » Data Type » Decimal »

 

Decimal Floating Point Arithmetic


Decimal Floating Point Arithmetic


from decimal import *       

print Decimal('0.70') * Decimal('1.05')

print .70 1.05

Decimal('1.00') % Decimal('.10')
Decimal("0.00")
print 1.00 0.10
       
print sum([Decimal('0.1')]*10== Decimal('1.0')
print sum([0.1]*10== 1.0



           
       



    Related Scripts with Example Source Code in same category :

Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .


PYTHON examples

 Navioo Data Type
» Decimal