| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
negative; fix to return an (appropriately signed) zero instead.
|
| |
|
|
|
|
|
| |
should fix the problem in the same way that
the cmath.phase problems were fixed.
|
|
|
|
|
|
| |
math.pow behave on alpha Tru64. All IEEE 754
special values are now handled directly; only
the finite**finite case is handled by libm.
|
|
|
|
| |
special-value handling to math.modf code.
|
|
|
|
| |
Windows/VS2008 doesn't like (-1)**(+-inf).
|
|
|
|
|
| |
handling code in math.pow, in the hope of making all
tests pass on the alpha Tru64 buildbot.
|
|
|
|
|
|
| |
The patch is collaborated work of Mark Dickinson and me. It was mostly done a few months ago. The patch fixes a lot of loose ends and edge cases related to operations with NaN, INF, very small values and complex math.
The patch also adds acosh, asinh, atanh, log1p and copysign to all platforms. Finally it fixes differences between platforms like different results or exceptions for edge cases. Have fun :)
|
| |
|
|
|
|
|
| |
http://mail.python.org/pipermail/python-dev/2008-January/076626.html and issue
1965.
|
| |
|
|
|
|
|
| |
and eliminate a compiler warning in floatobject.c. There might be
a better way to go about this, but it should be good enough for now.
|
|
|
|
|
|
|
|
|
|
|
|
| |
round included:
* Revert round to its 2.6 behavior (half away from 0).
* Because round, floor, and ceil always return float again, it's no
longer necessary to have them delegate to __xxx___, so I've ripped
that out of their implementations and the Real ABC. This also helps
in implementing types that work in both 2.6 and 3.0: you return int
from the __xxx__ methods, and let it get enabled by the version
upgrade.
* Make pow(-1, .5) raise a ValueError again.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
the complex_pow part), r56649, r56652, r56715, r57296, r57302, r57359, r57361,
r57372, r57738, r57739, r58017, r58039, r58040, and r59390, and new
documentation. The only significant difference is that round(x) returns a float
to preserve backward-compatibility. See http://bugs.python.org/issue1689.
|
|
|
|
|
| |
There should be no functional changes. However, the error msgs are
slightly different. Also verified that the module dict is not NULL on init.
|
| |
|
| |
|
|
|
|
| |
Probably should be backported.
|
| |
|
| |
|
|
|
|
| |
This fixes a problem that math.sqrt(-1) doesn't raise math.error.
|
| |
|
|
|
|
|
|
| |
* Py_BuildValue("(OOO)",a,b,c) --> PyTuple_Pack(3,a,b,c)
* Py_BuildValue("()",a) --> PyTuple_New(0)
* Py_BuildValue("O", a) --> Py_INCREF(a)
|
|
|
|
|
|
|
| |
Obtain cleaner coding and a system wide
performance boost by using the fast, pre-parsed
PyArg_Unpack function instead of PyArg_ParseTuple
function which is driven by a format string.
|
| |
|
|
|
|
|
|
| |
for Py_Main().
Thanks to Kalle Svensson and Skip Montanaro for the patches.
|
| |
|
|
|
|
| |
feature request 426539.
|
|
|
|
| |
instead.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
requires that errno ever get set, and it looks like glibc is already
playing that game. New rules:
+ Never use HUGE_VAL. Use the new Py_HUGE_VAL instead.
+ Never believe errno. If overflow is the only thing you're interested in,
use the new Py_OVERFLOWED(x) macro. If you're interested in any libm
errors, use the new Py_SET_ERANGE_IF_OVERFLOW(x) macro, which attempts
to set errno the way C89 said it worked.
Unfortunately, none of these are reliable, but they work on Windows and I
*expect* under glibc too.
|
|
|
|
|
|
|
| |
system:
SCO_ATAN2_BUG, SCO_ACCEPT_BUG, and STRICT_SYSV_CURSES.
Work aroudn a bug in the SCO UnixWare atan2() implementation.
|
|
|
|
| |
minimizes roundoff error.
|
|
|
|
|
|
| |
getting Infs, NaNs, or nonsense in 2.1 and before; in yesterday's CVS we
were getting OverflowError; but these functions always make good sense
for positive arguments, no matter how large).
|
|
|
|
| |
Repaired the ldexp docstring (said the name of the func was "ldexp_doc").
|
|
|
|
|
|
| |
Peter Schneider-Kamp.
Clarified some docstrings in the spirit of the patch; left out the
degrees() and radians() functions (see the patch comments on SF).
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
libm result is 0). Cautiously add a few libm exception test cases:
1. That exp(-huge) returns 0 without exception.
2. That exp(+huge) triggers OverflowError.
3. That sqrt(-1) raises ValueError specifically (apparently under glibc linked
with -lieee, it was raising OverflowError due to an accident of the way
mathmodule.c's CHECK() macro happened to deal with Infs and NaNs under gcc).
|
|
|
|
| |
FRED, please check my monkey-see-monkey-do Tex fiddling!
|
|
|
|
| |
This should match the situation in the 1.6b1 tree.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Py_FatalError() from module initialization functions. The importing
mechanism already checks for PyErr_Occurred() after module importation
and it Does The Right Thing.
Unfortunately, the following either were not compiled or tested by the
regression suite, due to issues with my development platform:
almodule.c
cdmodule.c
mpzmodule.c
puremodule.c
timingmodule.c
|
|
|
|
| |
(and yes, "Currintly" also counts <0.5 wink>)
|
|
|
|
| |
marked my*.h as obsolete
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
and a couple of functions that were missed in the previous batches. Not
terribly tested, but very carefully scrutinized, three times.
All these were found by the little findkrc.py that I posted to python-dev,
which means there might be more lurking. Cases such as this:
long
func(a, b)
long a;
long b; /* flagword */
{
and other cases where the last ; in the argument list isn't followed by a
newline and an opening curly bracket. Regexps to catch all are welcome, of
course ;)
|
| |
|
|
|
|
|
|
|
| |
Revise math_1(), math_2(), stub-generating macros, and function tables to
use PyArg_ParseTuple() and properly provide the function name for error
message generation.
Fix pow() docstring for MPW 3.1; had said "power" instead of "pow".
|
|
|
|
| |
Reported on c.l.py by Kirill Simonov.
|