Skip to content

PyModule: decimal

Latest
Compare
Choose a tag to compare
@cheny0y0 cheny0y0 released this 06 Oct 05:54
4862449

Update information:

  1. bug fixes:
    (1) Add decimals modulo ZeroDivisionError
    (2) Catch a number not in “decimal” class
  2. add sum function(self.sum(var1,var2,*vars))
  3. More accurate division. Uses self / value to keep 100 digits after the decimal point as a infinite decimal places. Uses decimal(1) / decimal(7) will return 0.1428571428571428571428571428571428571428571428571428571428571428571428571428571428571428571428571423. Or uses advanced function self.placediv(othernum,places,last="round"). Uses decimal(19).placediv(decimal(16),2) will return 1.19.