0

Why does the result of the next product yield the result 0?

print(3.944069389679206e-306*2.85043837e-46)
Elhanan Schwarts
  • 363
  • 1
  • 11
  • It is not just python, other languages have the same issue like @rdas referred to, but also another limitation is that all languages has decimal limit to display, afterward that limit, it would discard it. I think in R it is 14 decimals, and 15 in python, you can try it with pi. – user432797 Nov 16 '20 at 05:19

1 Answers1

0

The product that results from that multiplication is too small for floats to hold.

Python uses double-precision floats, which can hold values from about 10 to the -308 to 10 to the 308 power.

BWallDev
  • 345
  • 3
  • 13