+ 2

Why should i use float in c++ when i can just kepp using double

Float or double c++

29th Jun 2019, 4:24 AM
DONALSOFT
DONALSOFT - avatar
2 Réponses
+ 2
Thanks
29th Jun 2019, 5:32 AM
DONALSOFT
DONALSOFT - avatar
+ 1
One of the reason is that it will save more spaces. As we know, double has the size of 8 bytes which is twice as large as float. However, most arithmetic calculations don't need such precision. Therefore, using float can be much more effective
29th Jun 2019, 5:29 AM
Agent_I
Agent_I - avatar