提问人:Bear Bile Farming is Torture 提问时间:6/17/2019 更新时间:6/18/2019 访问量:51
在 R 中处理 IEEE 754 浮点不精确问题的最佳方法是什么?
What is the best way to handle IEEE 754 floating point imprecision issues in R?
问:
所以问题是 .1 + .2 =/= .3
语言是 R。
我有一堆分数,最终总和应该为 1。我有一个失败的断言语句,因为由于这个问题,这种不变性并不总是成立。
最好的解决方案是什么?
答: 暂无答案
上一个:浮点乘法上的误差边界
评论
abs(1-val) < .000000000000001
all.equal()