Difference between double and float [english]

Difference between double and float

[28.11.2010 02:29:19] Hallaghan [Third Eye] каза: it's the precision

[28.11.2010 02:29:21] Hallaghan [Third Eye] каза: as in here

[28.11.2010 02:29:24] Hallaghan [Third Eye] каза: 1,8731

[28.11.2010 02:29:32] Hallaghan [Third Eye] каза: see the number of decimal places?

[28.11.2010 02:29:36] Bloo каза: yeh?

[28.11.2010 02:29:43] Hallaghan [Third Eye] каза: double allows more places and they become more precise

[28.11.2010 02:29:53] Hallaghan [Third Eye] каза: float has a limit of decimal places

[28.11.2010 02:30:10] Hallaghan [Third Eye] каза: and when it applies redundancy, it usually doesn't do it right

[28.11.2010 02:30:17] Hallaghan [Third Eye] каза: for casual numbers, it's okay

[28.11.2010 02:30:29] Hallaghan [Third Eye] каза: but applications which manage money, we always use doubles

[28.11.2010 02:30:31] Bloo каза: aaah so this is why when i calculate hiiigh numbers

[28.11.2010 02:30:41] Bloo каза: like 686854254*254245= 5.e-14 or smth like that

[28.11.2010 02:30:50] Hallaghan [Third Eye] каза: you can't fit a big decimal number into a float

[28.11.2010 02:31:00] Bloo каза: so only double

[28.11.2010 02:31:02] Bloo каза: k ty :)

[28.11.2010 02:31:04] Hallaghan [Third Eye] каза: that's the same with the use of int32 and int64

[28.11.2010 02:31:31] Hallaghan [Third Eye] каза: they only differ in how much memory they can allocate

[28.11.2010 02:31:45] Hallaghan [Third Eye] каза: int64 lets you allocate a much bigger range of integers

Decimal vs Double vs Float

The Decimal, Double, and Float variable types are different in the way that they store the values. Precision is the main difference where float is a single precision (32 bit) floating point data type, double is a double precision (64 bit) floating point data type and decimal is a 128-bit floating point data type.

**Float - 32 bit (7 digits)**

**Double - 64 bit (15-16 digits)**

**Decimal - 128 bit (28-29 significant digits)**

More about......Decimal vs Double vs Float

Lynda