I've seen examples of the terms "float" and "double" being applied to different scenarios and seem to understand that bits and bytes serve some role, but I cannot find a clear explanation of what the difference is. Memory constraints seem like the cause of such differentiation
Asked
Active
Viewed 103 times
-1
-
doubles store twice as much information – OneCricketeer Oct 31 '21 at 07:28
1 Answers
0
float has size of 4 bytes with range 3.4e-038 to 3.4e+038 . whereas double has size of 8 bytes with the range 1.7e-308 to 1.7e+308. float allows 6 decimal digits whereas double allows 15 decimal digits.
please go through this link for more info https://www.javatpoint.com/float-vs-double-java .

Karamveer Gahlot
- 222
- 2
- 8