擅长:python、mysql、java
<p>Python实现了ieee754双精度,所以它的输出更接近真实答案。在</p>
<p>来自文档:<a href="https://docs.python.org/3/tutorial/floatingpoint.html#representation-error" rel="nofollow noreferrer">https://docs.python.org/3/tutorial/floatingpoint.html#representation-error</a></p>
<blockquote>
<p>Almost all machines today (November 2000) use IEEE-754 floating point
arithmetic, and almost all platforms map Python floats to IEEE-754
“double precision”.</p>
</blockquote>
在C++浮点中,P>是单精度的。{{cd2>应该使用相似的输出。在</p>