What is the functioning of float? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

What is the functioning of float?

I don't Understand how and where to use it.

18th May 2018, 9:12 PM
Saliou Goni
Saliou Goni - avatar
4 Answers
+ 2
it is a data type that exists in a many programming languages that allows store decimal numbers
18th May 2018, 9:20 PM
Shahd Moemen
Shahd Moemen - avatar
+ 1
i wanna try it again thank u for ur answers
18th May 2018, 9:24 PM
Saliou Goni
Saliou Goni - avatar
+ 1
Nowadays most compilers use double as their standard floating point data type. It works the same, but has more precision than float. If you don't know exactly what you're doing - and believe me, almost nobody does - you should also use double instead of float. Otherwise you could cause bugs due to the constant conversions between float and double by the compiler.
18th May 2018, 11:42 PM
Chris
Chris - avatar
0
ok
18th May 2018, 9:23 PM
Saliou Goni
Saliou Goni - avatar