The types float, double and the variant long double, are all considered to be floating-point types. On the other hand, the double type has 64-bit storage. Is that the reason? As double has more precision as compare to that of flot then it is much obvious that it occupies twice memory as occupies by the float data type. The primary difference between float and double is that the float type has 32-bit storage. It has the double precision or you can say two times more precision than float. Double variables can hold numbers as small as -4.94065645841246544E-324 for negative values and 4.94065645841246544E-324 for positive values . This article will give you the detailed difference between float and double data type. The widening happens in a byte, short, int, long, float, double. If you only need to store whole numbers, such as 12 or 12,345,678, specify a short or long integer. Float and Double both are the data types under Floating-point type. Using the float() function each string or integer could be changed to a float, e.g: In above program, the num1 variable has value 10. The total is an int. According to IEEE, it has a 32-bit floating point precision. long double: Real floating-point type, usually mapped to an extended precision floating-point number format. 6-7 significant digits for float and ±1.79769313486231570E+308 i.e. Also range of both the data types could be represented as ±3.40282347E+38F i.e. Actual properties unspecified. Double takes 8 bytes for storage. For example, double floating point numbers have larger ranges than Decimal numbers and Double is the most efficient floating-point data type. Instead I see Int and Double, particularly when SHORT and FLOAT are sufficient. {double atoms; atoms = 2304.01;} Comparison between Double and Integer in C programming language: In the scheme of things, devices have more memory and are faster. Summary – Integer vs Float. There are eight major primitive types in Java. Sometimes it is necessary to convert the primitive data types to object and object to primitive types. They are int, short, byte, long, boolean, char, float and double. Float and double are primitive data types used by programming languages to store floating-point real (decimal) numbers like 10.923455, 433.45554598 and so on. Each primitive type has a corresponding wrapper class. According to IEEE, it has a 64-bit floating point precision. The variable num2 has value 20. Float vs Double: Difference You should know or is it insignificant that it does not make an impact. 15-16 significant digits for double. Both int and double are used with modifiers like short, long, signed and unsigned. When assigning a larger data type to a small data type, it is necessary to do the casting. The Floating-point numbers are the real numbers that have a fractional component in it. Float takes 4 bytes for storage. Long integer; Float (single-precision floating-point numbers) Double (double-precision floating-point numbers) In choosing the data type, first consider the need for whole numbers versus fractional numbers. exp, sin, etc.). In most of the threads I read including mine, I seldom see Short or Float used to DIM variables. Wrapper classes are used for that. Long integer; Float (single-precision floating-point numbers) Double (double-precision floating-point numbers) In choosing the data type, consider the need for whole numbers versus fractional numbers. Figure 02: Casting. To check if something is a float we can use the isinstance() function, e.g: isinstance(4.5, float)# returns True As a general rule integers don't have a decimal point, whereas floats do, so 55 and 55.0 have the same value but they are different types. If you just need to store whole numbers, such as 12 or 12,345,678, specify a short or long integer. The default choice for a floating-point type should be double.This is also the type that you get with floating-point literals without a suffix or (in C) standard functions that operate on floating point numbers (e.g.