为什么Python返回值“ -0.0”?

时间:2019-03-26 14:57:31

标签: python python-3.5 division zero negative-number

一个例子:

> dhcp-wifi-8021x-155-41-14-238:~ user$ python
Python 3.5.6 |Anaconda, Inc.| (default, Aug 26 2018, 16:30:03) 
[GCC 4.2.1 Compatible Clang 4.0.1 (tags/RELEASE_401/final)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> 0/-1
-0.0

为什么Python返回-0.0而不是0.0?

0 个答案:

没有答案