+ 2

What is the difference,between Double and Float

28th Oct 2016, 11:25 AM
David
David - avatar
3 Respostas
+ 3
Float uses 32 bits, while Double uses 64 bits, so you can store much larger numbers or more decimal points in Double.
28th Oct 2016, 12:11 PM
Daniel Oravec
Daniel Oravec - avatar
0
Thank you.
28th Oct 2016, 12:34 PM
David
David - avatar
0
Daniel, not always. It depends on the platform. Sometimes a float is 16 bits and a double is 32 (or older systems even half that). The point is a Double on most platforms is twice the number of bits than a float (hence the name "double") and typically the most precise analog value the system supports. Since most modern systems are now 64 bit, the double uses that many. You will not find a "quadruple" or "double-double" :) this applies to integers as well. A "long" or "dword" (double word) is twice the number of bits as an "int" or "word", but the term "word" inherently means 16 bits and "dword" 32. Int and Long however may vary based on platform like float and double. That is why many programmers use word and dword instead of int and long because those definitions are more consistent between various platforms.
23rd Nov 2016, 5:13 AM
David-Hesh Hochhauser
David-Hesh Hochhauser - avatar