+ 2
I just now started Phython tutorial. What's meant by float?
4 Answers
+ 5
float is a decimal point number. 1.5, 0.33333, etcđ
+ 5
It stands for floating point.
+ 2
+ 2
A float data type stores decimal values. It has a limited number of bits but it can hold an enormous range of values by keeping track of where the decimal point goes. Because the decimal point is moveable, it is described as "floating" like a boat that is not anchored in one place, and we use the terms "floating decimal point", or "floating point". This is in contrast with "fixed decimal point" or "fixed point", which is rarely used in high-level languages like Python. [It could be argued that integers are fixed point with the decimal affixed before the rightmost digit so that there are no decimal digits.] You should understand that as the magnitude of a float value increases, its precision decreases. That is because more bits will be needed on the left side of the decimal for larger values so the right side gets fewer bits. In Python this is a lesser concern than in older languages because Python's float is double precision. It has twice the number of bits compared to standard floats in most languages.