how to sum a large number of float number?

前端 未结 5 2108
忘掉有多难
忘掉有多难 2020-12-06 06:26

I build a paralle sum code to sum a large number of float numbers then I found when the number of figures is bigger than 100000000, the result will go wrong. Then I build a

5条回答
  •  醉梦人生
    2020-12-06 07:15

    Alex Brown's answer is excellent. . For a full explanation of floating point problems try this

提交回复
热议问题