+ 1

Difference between float or Double

what is the difference??

22nd Aug 2016, 8:13 PM
Rebin Khailany
Rebin Khailany - avatar
7 Réponses
+ 6
difference between them is that Double has a higher precision of around 15 decimal digits, whereas Float has around 6.
22nd Aug 2016, 11:56 PM
Aung Thuya
Aung Thuya - avatar
+ 6
yes, double take more memory. if you use float for double value, you will lose data.
23rd Aug 2016, 6:36 AM
Aung Thuya
Aung Thuya - avatar
+ 4
float is used up to six decimal points no. whereas double is used for more than six decimal points .
23rd Aug 2016, 11:00 AM
Nabarup Ghosh
Nabarup Ghosh - avatar
+ 1
so I assume that a double than takes more memory space than a float. To save same space you better use floats? is that correct? What happens / goes wrong, if you use a float for a double or vice versa?
23rd Aug 2016, 6:32 AM
Rebin Khailany
Rebin Khailany - avatar
+ 1
Float uses 4 bytes whereas double uses 8 bytes of memory.
28th Aug 2016, 6:25 AM
Vinayak
+ 1
i beleive, double for float only cause more memory. float for double will cause problem because if you think your values will be high than float precision you should use double(max cases it wontt happen) and we should be careful on these.
4th Oct 2016, 9:27 PM
Gopi K
Gopi K - avatar
0
What he said
23rd Aug 2016, 5:29 AM
hidurp46