0

am want to divide 99999999999999999 on 100000 the answer is 9999999.9999999999‬ but python is auto rounding it to 1000000000000.0

>>> 99999999999999999/100000
1000000000000.0

Here's how is it shown

bibs2091
  • 31
  • 1
  • 4

1 Answers1

3

Use Decimal

>>> from decimal import Decimal
>>> Decimal(99999999999999999)/Decimal(100000)
Decimal('999999999999.99999')
sashaaero
  • 2,618
  • 5
  • 23
  • 41