What is the difference between float and double?

前端 未结 13 919
悲哀的现实
悲哀的现实 2020-11-22 06:00

I\'ve read about the difference between double precision and single precision. However, in most cases, float and double seem to be interchangeable,

13条回答
  •  野趣味
    野趣味 (楼主)
    2020-11-22 06:14

    Unlike an int (whole number), a float have a decimal point, and so can a double. But the difference between the two is that a double is twice as detailed as a float, meaning that it can have double the amount of numbers after the decimal point.

提交回复
热议问题