Home/Support/Support Forum/Difference between Float and Double Data types?
Welcome to Digi Forum, where you can ask questions and receive answers from other members of the community.

Difference between Float and Double Data types?

0 votes
Apart from memory size of Float and Double data types, I want to know any other differences and also want to know when we use float and when we use double Data type?
asked Feb 23 in 3rd Party Python and API development in other Languages by swetajoshi New to the Community (0 points)

Please log in or register to answer this question.

1 Answer

0 votes
There is a distinct difference in precision between the two.

Do you need precise values to 20+ decimal places? Are you dealing with fractions of a cent or calculating rocket trajectories? Would being off by .0000000000000000000000000000001 have you looking for missing hikers 100 miles away from their last known coordinates? Do lives hang in the balance? Use doubles.

Do you intend to round the value up or down, can't measure values to that degree or don't inherently care how many decimal places there are? Are you measuring the temperature outside? How long it took to run a quarter-mile? The sum of the change in your pocket? Use floats.
answered Feb 27 by starfish New to the Community (11 points)
...