float

Python

Le type float a une précision limitée. Il s'agit de nombres flottant double précision.

  • 3.7 # notez le point, ce n'est pas une virgule
  • -3.7e10.5 # 10 puissance moins 5


Extrait du manuel de référence du manuel : "These represent machine-level double precision floating point numbers. You are at the mercy of the underlying machine architecture (and C or Java implementation) for the accepted range and handling of overflow. Python does not support single-precision floating point numbers; the savings in processor and memory usage that are usually the reason for using these is dwarfed by the overhead of using objects in Python, so there is no reason to complicate the language with two kinds of floating point numbers."

» Glossaire du langage python