+ 12
So what is the difference between a float, double, and long double?
Aren't they all the same function with more size. When would I use a double over a float? Or a float over a long double?
12 Respuestas
+ 15
They represent same kind of data type but with different sizes and precision.. if you don't require your decimal number to be very precise, then it's better to use float.. this helps in using ur system memory efficiently..
+ 8
first of all they are not functions, but are data types. They have different sizes and precision.
+ 1
Basically all of them represent the decimal values such as 3.14
The main difference between them is that in float we can store values upto 4 bytes (6 places after decimal point)
Double upto 8 bytes
And long double even more than float and double.
0
i think its a matter of size and precision and accuracy. for more precise calxulations, you would use double etc.
0
each of them has its own range ,thus its size changes
0
they all are numbers which include decimal point in it.. they differ just in range n size i-e how many digits after the decimal point..
0
size of the decimal points i think
0
hello buddy ,
they all are deta type . float, double and long double are different becouse of memory space .
0
well float is of 4 bytes and double n long are of 8bytes. You need long if the no. you need to save is in 2^32 and if it's more than that you can go with double.
0
both are a data type.they use for select the memory size for store a variable.
0
مرحبا
- 2
Difference is just about the Range, Otherwise no difference at all. You Store whatever value you want, php will automatically save it accordingly.