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
  • 11
  • 1
  • 3

1 Answers1

2

Use Decimal

>>> from decimal import Decimal
>>> Decimal(99999999999999999)/Decimal(100000)
Decimal('999999999999.99999')
sashaaero
  • 2,196
  • 3
  • 20
  • 36