Google表小于或平等(< =)提供错误的结果
公式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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您运行:
并扩展小数位置,您将获得:
行为。这是由于Google如何存储数字,而这种“胡说八道”称为“四舍五入错误”(但不是错误),
请参见: https://stackoverflow.com/a/722330592/5632629
在您的情况下,请尝试:
if you run:
and expand decimal places you will get:
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: