fork download
  1. from decimal import Decimal
  2. # with binary floating points
  3. print(divmod(356, 3.56))
  4. # with arbitrary roundings
  5. print(Decimal('356') % Decimal('3.56'))
Success #stdin #stdout 0.02s 11656KB
stdin
Standard input is empty
stdout
(99.0, 3.5599999999999947)
0.00