Google表小于或平等(< =)提供错误的结果

发布于 2025-02-13 04:17:16 字数 139 浏览 1 评论 0原文

公式0< =(1.36*100/1.36)-100在期望为true时返回false。

但是

0< =(1.26*100/1.26)-100返回正确的结果。 为什么?

Formula 0<=(1.36*100/1.36)-100 returns FALSE while expects TRUE.

But

0<=(1.26*100/1.26)-100 returns correct result TRUE.
Why?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

你没皮卡萌 2025-02-20 04:17:16

如果您运行:

=(1.36*100/1.36)-100

并扩展小数位置,您将获得:

​ 行为。这是由于Google如何存储数字,而这种“胡说八道”称为“四舍五入错误”(但不是错误),

请参见: https://stackoverflow.com/a/722330592/5632629

在您的情况下,请尝试:

=0<=ROUND((1.36*100/1.36)-100)

if you run:

=(1.36*100/1.36)-100

and expand decimal places you will get:

enter image description here

which is totally fine even if you do not expect such behavior. this is due to how google sheets stores the numbers and this "nonsense" is called "rounding error" (yet it is not an error)

see: https://stackoverflow.com/a/72230592/5632629

in your case try:

=0<=ROUND((1.36*100/1.36)-100)

enter image description here

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文