Decimal Floating Point Arithmetic : Decimal : Data Type : Python examples (example source code) Organized by topic

C++
PHP
Python


Python  »  Data Type   » [  Decimal  ]  Screenshots 
 



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 examples in the same category
























Home| Contact Us
Copyright 2003 - 04 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.