+ 1

What is precisely a double?

I think I didn't get what is a double in C. I searched the web and double appear to be like float, but stored in a bigger memory area. Is that correct, is that all and if it doesn't, what's it?

29th Jul 2019, 1:53 PM
Gwlanbzh
Gwlanbzh - avatar
2 ответов
+ 1
Yes that is correct. A double is like a float, only it's more precise in representing fractional number. A float has the size of 32 bits, or 4 bytes, and double has the size of 64 bits, or 8 bytes. Therefore, it's only natural if double is more precise than float. You can refer to https://en.m.wikipedia.org/wiki/Double-precision_floating-point_format for more info. If you're still new to something like this, you don't really need to worry about the difference between float and double
29th Jul 2019, 2:07 PM
Agent_I
Agent_I - avatar
0
Oh okay thank you
29th Jul 2019, 5:51 PM
Gwlanbzh
Gwlanbzh - avatar