Python数学是错误的

编程入门 行业动态 更新时间:2024-10-27 14:20:14
本文介绍了Python数学是错误的的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

可能重复: 带有浮点数的Python舍入错误

Possible Duplicate: Python rounding error with float numbers

Python 2.7.3 (v2.7.3:70274d53c1dd, Apr 9 2012, 20:52:43) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin Type "copyright", "credits" or "license()" for more information. >>> 4.2 - 1.8 2.4000000000000004 >>> 1.20 - 1.18 0.020000000000000018 >>> 5.1 - 4 1.0999999999999996 >>> 5 - 4 1 >>> 5.0 - 4.0 1.0

为什么Python的数学错误?

Why is Python getting its maths wrong?

推荐答案

您已经达到了计算机科学的新水平,并且正走向成熟.

You have reached a new level in computer science, and you are coming of age.

因此,您现在可以进行下一步了. BDFL已授权我他自己向您透露以下超级机密文件.古人先理解它,再解密它,现在,你也将如此!

You therefore are now ready for the next step. I have been authorized by the BDFL himself to reveal the following Super Secret document to you. The ancients understood it and deciphered it first, and now, so will you!

请谨慎处理本文档!只与认识的人分享同样令人困惑的结论!

Treat this document with care! Only share this with people you know have reached the same baffling conclusions!

主持人说明

此答案不能代表Stack Overflow的预期质量标准.但是,它出乎意料地发展了自己的生活,现在仅保留其历史意义.

This answer is not representative of the expected quality standards on Stack Overflow. However, it has unexpectedly developed a life of its own and is solely preserved for historical significance now.

更多推荐

Python数学是错误的

本文发布于:2023-10-24 09:02:44,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1523517.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:错误   数学   Python

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!