Python - Float Numeric

> Procedural Languages > Python > Python - Data Type

1 - About

floats (fractional numbers written with a decimal point, like 1.970),

Advertising

3 - Initialization

my_float = 1.23

For arithmetic over R (Rational), Python uses floats, so round-off errors occur:

>>> 10.0**16 + 1 == 10.0**16
True

Consequently algorithms such as do not find exactly correct solutions.