摘要:
python 3的更新中,不再支持 str 和 int 直接判定 python 2中 手册中的描述 ...the choice whether one object is considered smaller or larger than another one is made arbitraril 阅读全文
摘要:
详细的原理在IEEE 754浮点数标准 小数以二进制形式表示时的有穷性导致的, 这不是Python的问题,而是实数的无限精度跟计算机的有限内存之间的矛盾 计算机的内存、cpu寄存器等等这些硬件单元都是有限的,只能表示有限位数的二进制位,因此存储的二进制小数就会和实际转换而成的二进制数有一定的误差。( 阅读全文