Floating point numbers

Numbers with certain places after the decimal point are referred to as floating point numbers in the programming language:

  • The floating point number type ranges approximately from -10 to 10^308 and has 16 digits of precision.
  • There are two ways to write a floating point number. It can be written using ordinary decimal notation or scientific notation. Scientific notation is often useful for mentioning very large numbers, as shown in the following screenshot:

Get Learn Python in 7 Days now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.