]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
SF bug 115831 and Ping's SF patch 101751, 0.0**-2.0 returns inf rather than
authorTim Peters <tim.peters@gmail.com>
Fri, 6 Oct 2000 00:36:09 +0000 (00:36 +0000)
committerTim Peters <tim.peters@gmail.com>
Fri, 6 Oct 2000 00:36:09 +0000 (00:36 +0000)
commitc54d19043a595679f253a55e46fda2910f513c52
treea737fd6e07e1224f22837ac9822f36b5cdb1524d
parent4779a0a6fd444d594f1cbb992c636d66f59a5d1d
SF bug 115831 and Ping's SF patch 101751, 0.0**-2.0 returns inf rather than
raise ValueError.  Checked in the patch as far as it went, but also changed
all of ints, longs and floats to raise ZeroDivisionError instead when raising
0 to a negative number.  This is what 754-inspired stds require, as the "true
result" is an infinity obtained from finite operands, i.e. it's a singularity.
Also changed float pow to not be so timid about using its square-and-multiply
algorithm.  Note that what math.pow does is unrelated to what builtin pow
does, and will still vary by platform.
Lib/test/test_pow.py
Objects/floatobject.c
Objects/intobject.c
Objects/longobject.c