I just now started Phython tutorial. What's meant by float? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

I just now started Phython tutorial. What's meant by float?

8th May 2019, 12:26 AM
Ahmed bin Fausar
Ahmed bin Fausar - avatar
4 Answers
+ 5
float is a decimal point number. 1.5, 0.33333, etc😀
8th May 2019, 1:15 AM
Choe
Choe - avatar
+ 5
It stands for floating point.
8th May 2019, 4:09 AM
Sonic
Sonic - avatar
8th May 2019, 1:21 AM
Calviղ
Calviղ - avatar
+ 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.
8th May 2019, 4:28 AM
Brian
Brian - avatar