Decimal Floating Point Arithmetic,decimalarithmetic,from decimal
Decimal Floating Point Arithmetic,decimalarithmetic,from decimal
from decimal import * print Decimal('0.70') * Decimal('1.05')print .70 * 1.05Decimal('1.00') % Decimal('.10')Decimal('0.00')print 1.00 % 0.10print sum([Decimal('0.1')]*10) == Decimal('1.0')print sum([0.1]*10) == 1.0
相关内容
- Convert String to integer (int),convertinteger,car = '123'c
- int function,function,print int('0
- Long Integer,longinteger,def c( p ) :
- octal literals,octal,print 01, 0
- Using Lists as Queues,listsqueues,# To add an
- Set operations on unique letters from two words,operationsunique,a
- Use List as a stack: push and pop,stackpush,L = []L.appe
- Updating a Database,updatingdatabase,import MySQL
- List Mini-Web Pages with Editing Links,mini-webediting, #!C:/Python
- pickle Module,picklemodule,#take almost
评论关闭