Float
Data Type
Introduction
In computer science, The float data type is a fundamental data type built into the compiler and used to define numeric variables holding numbers with decimal points. A float type can represent fractional as well as whole values. It can contain up to 7 digits in total, including those before and after the decimal point. The double type, which has a larger range, supporting up to 15 digits and the float type was commonly used at one time because it was faster than the double when dealing with thousands or millions of floating-point numbers. Because calculation speed has increased dramatically with new processors, however, the advantages of floats over doubles are negligible. Many programmers consider the double type to be the default when working with numbers that require decimal points.