cpython/Objects
Tim Peters 96685bfbf0 float_pow: Put *all* of the burden on the libm pow in normal
cases.
powu:  Deleted.

This started with a nonsensical error msg:

>>> x = -1.
>>> import sys
>>> x**(-sys.maxint-1L)
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
ValueError: negative number cannot be raised to a fractional power
>>>

The special-casing in float_pow was simply wrong in this case (there's
not even anything peculiar about these inputs), and I don't see any point
to it in *any* case:  a decent libm pow should have worst-case error under
1 ULP, so in particular should deliver the exact result whenever the exact
result is representable (else its error is at least 1 ULP).  Thus our
special fiddling for integral values "shouldn't" buy anything in accuracy,
and, to the contrary, repeated multiplication is less accurate than a
decent pow when the true result isn't exactly representable.  So just
letting pow() do its job here (we may not be able to trust libm x-platform
in exceptional cases, but these are normal cases).
2001-08-23 22:31:37 +00:00
..
.cvsignore Ignore a bunch of generated files. 2000-05-02 18:34:30 +00:00
abstract.c Patch #445762: Support --disable-unicode 2001-08-17 18:39:25 +00:00
bufferobject.c Merge of descr-branch back into trunk. 2001-08-02 04:15:00 +00:00
cellobject.c Merge of descr-branch back into trunk. 2001-08-02 04:15:00 +00:00
classobject.c Fix core dump in repr() of instancemethod whose class==NULL. 2001-08-17 13:59:27 +00:00
cobject.c REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00
complexobject.c Patch #445762: Support --disable-unicode 2001-08-17 18:39:25 +00:00
descrobject.c Add new built-in type 'getset' (PyGetSet_Type). 2001-08-23 21:40:38 +00:00
dictobject.c Patch #427190: Implement and use METH_NOARGS and METH_O. 2001-08-16 13:15:00 +00:00
fileobject.c Patch #427190: Implement and use METH_NOARGS and METH_O. 2001-08-16 13:15:00 +00:00
floatobject.c float_pow: Put *all* of the burden on the libm pow in normal 2001-08-23 22:31:37 +00:00
frameobject.c Merge of descr-branch back into trunk. 2001-08-02 04:15:00 +00:00
funcobject.c func_getattro(), func_setattro(): Implement the new semantics for 2001-08-14 18:23:58 +00:00
intobject.c err_ovf(): only raise OverflowError when OverflowWarning was raised. 2001-08-23 21:32:40 +00:00
iterobject.c Patch #427190: Implement and use METH_NOARGS and METH_O. 2001-08-16 13:15:00 +00:00
listobject.c Patch #427190: Implement and use METH_NOARGS and METH_O. 2001-08-16 13:15:00 +00:00
longobject.c Patch #445762: Support --disable-unicode 2001-08-17 18:39:25 +00:00
methodobject.c Patch #427190: Implement and use METH_NOARGS and METH_O. 2001-08-16 13:15:00 +00:00
moduleobject.c module_repr(): Instead of fixing the maximum buf size to 400, 2001-08-16 20:39:24 +00:00
object.c Patch #445762: Support --disable-unicode 2001-08-17 18:39:25 +00:00
obmalloc.c Identifiers matching _[A-Z_]\w* are reserved for C implementations. 2001-03-11 18:36:13 +00:00
rangeobject.c Patch #427190: Implement and use METH_NOARGS and METH_O. 2001-08-16 13:15:00 +00:00
sliceobject.c Merge of descr-branch back into trunk. 2001-08-02 04:15:00 +00:00
stringobject.c Patch #445762: Support --disable-unicode 2001-08-17 18:39:25 +00:00
tupleobject.c Merge of descr-branch back into trunk. 2001-08-02 04:15:00 +00:00
typeobject.c Merge changes from r22a2-branch back into trunk. Also, change patch 2001-08-22 19:24:42 +00:00
unicodectype.c removed "register const" from scalar arguments to the unicode 2001-06-27 22:08:26 +00:00
unicodeobject.c Patch #427190: Implement and use METH_NOARGS and METH_O. 2001-08-16 13:15:00 +00:00
unicodetype_db.h forgot to check in the new makeunicodedata.py script 2001-01-21 17:01:31 +00:00
xxobject.c REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00