+ 1
Float
didnt quite grasp what this command does
2 Answers
+ 1
float is a datatype (like int, char etc.) for floating point numbers, like 1.715
+ 1
hi,
Float Command is a shortened term for "floating point." By definition, it'sĀ a fundamental data typeĀ built into the compiler that's used to define numeric values with floating decimal points. C, C++,Ā C#Ā and many other programming languages recognize float as a data type. Other common data types includeĀ intĀ andĀ double.
The float type can represent values ranging from approximately 1.5 x 10-45Ā to 3.4 x 1038, with aĀ precisionā the limit of digits ā of seven.
Float can contain up to seven digits inĀ total, not just following the decimal point ā so, for example, 321.1234567 cannot be stored in floatĀ because it has 10 digits. If greater precisionāmore digitsāis necessary, the double type is used.