Float

Lutz Horn lutz.horn at posteo.de
Fri Jul 29 05:56:55 EDT 2016


Am 07/29/2016 um 11:44 AM schrieb Cai Gengyang:
> Can someone explain in layman's terms what "float" means ?

The Python builtin float[1]

 > Return a floating point number constructed from a number or string x.

A floating point number[2] is number that is not an integer (and not a 
complex number). It

 > is the formulaic representation that approximates a real number

since computers can't handle handle "real" real numbers which would 
require infinite precision.

Examples are

1.0
3.14159

Lutz

[1] https://docs.python.org/3/library/functions.html#float
[2] https://en.wikipedia.org/wiki/Floating_point

-- 
https://www.lhorn.de/
https://emailselfdefense.fsf.org/de/



More information about the Python-list mailing list