+ 2
What is the difference,between Double and Float
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.
0
Thank you.
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.