Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | remove redundant sentence | Benjamin Peterson | 2008-12-20 | 1 | -1/+1 |
| | |||||
* | beef up docstring | Benjamin Peterson | 2008-12-20 | 1 | -1/+4 |
| | |||||
* | Issues #3167, #3682: tests for math.log and math.log10 were failing on | Mark Dickinson | 2008-12-11 | 1 | -3/+55 |
| | | | | | | Solaris and OpenBSD. Fix this by handling special values and domain errors directly in mathmodule.c, passing only positive nonspecial floats to the system log/log10. | ||||
* | Replace math.sum with math.fsum in a couple of comments | Mark Dickinson | 2008-07-30 | 1 | -2/+2 |
| | | | | that were missed by r65308 | ||||
* | Rename math.sum to math.fsum | Mark Dickinson | 2008-07-30 | 1 | -16/+16 |
| | |||||
* | Fix special-value handling for math.sum. | Mark Dickinson | 2008-07-30 | 1 | -38/+54 |
| | | | | | | Also minor cleanups to the code: fix tabbing, remove trailing whitespace, and reformat to fit into 80 columns. | ||||
* | Fix another typo in math_sum comment | Mark Dickinson | 2008-06-20 | 1 | -1/+1 |
| | |||||
* | Fix comment typos | Andrew M. Kuchling | 2008-06-20 | 1 | -2/+2 |
| | |||||
* | Fix double decref. | Raymond Hettinger | 2008-06-18 | 1 | -1/+0 |
| | |||||
* | Issue 3118: make test_math pass on Ubuntu/ia64. exp(-745.0) was raising | Mark Dickinson | 2008-06-17 | 1 | -3/+8 |
| | | | | | OverflowError incorrectly on this platform, presumably as a result of the libm setting errno = ERANGE for this call. | ||||
* | Unhappy buildbots. Revert 64052. Long doubles have unexpected effects on ↵ | Raymond Hettinger | 2008-06-09 | 1 | -20/+24 |
| | | | | some builds. | ||||
* | Address double-rounding scenarios by setting all variables to long doubles. | Raymond Hettinger | 2008-06-09 | 1 | -24/+19 |
| | |||||
* | Issue #2138: Add math.factorial(). | Raymond Hettinger | 2008-06-09 | 1 | -0/+50 |
| | |||||
* | * Mark intermedidate computes values (hi, lo, yr) as volatile. | Raymond Hettinger | 2008-05-30 | 1 | -19/+31 |
| | | | | | | | * Expand comments. * Swap variable names in the sum_exact code so that x and y are consistently chosen as the larger and smaller magnitude values respectively. | ||||
* | Fix two typos. | Raymond Hettinger | 2008-05-29 | 1 | -2/+2 |
| | |||||
* | Tweak the comments and formatting. | Raymond Hettinger | 2008-05-23 | 1 | -76/+47 |
| | |||||
* | Issue #2819: Add math.sum, a function that sums a sequence of floats | Mark Dickinson | 2008-05-23 | 1 | -0/+223 |
| | | | | | efficiently but with no intermediate loss of precision. Based on Raymond Hettinger's ASPN recipe. Thanks Jean Brouwers for the patch. | ||||
* | Issue #2487. math.ldexp(x, n) raised OverflowError when n was large and | Mark Dickinson | 2008-05-09 | 1 | -12/+54 |
| | | | | negative; fix to return an (appropriately signed) zero instead. | ||||
* | Silence 'r may be used uninitialized' compiler warning. | Mark Dickinson | 2008-04-21 | 1 | -0/+1 |
| | |||||
* | math.atan2 is misbehaving on Windows; this patch | Mark Dickinson | 2008-04-20 | 1 | -1/+37 |
| | | | | | should fix the problem in the same way that the cmath.phase problems were fixed. | ||||
* | Yet more explicit special case handling to make | Mark Dickinson | 2008-04-20 | 1 | -47/+55 |
| | | | | | | math.pow behave on alpha Tru64. All IEEE 754 special values are now handled directly; only the finite**finite case is handled by libm. | ||||
* | FreeBSD doesn't follow C99 for modf(inf); so add explicit | Mark Dickinson | 2008-04-20 | 1 | -0/+9 |
| | | | | special-value handling to math.modf code. | ||||
* | Additional special-case handling for math.pow. | Mark Dickinson | 2008-04-19 | 1 | -6/+13 |
| | | | | Windows/VS2008 doesn't like (-1)**(+-inf). | ||||
* | Additional tests for math.pow, and extra special-case | Mark Dickinson | 2008-04-19 | 1 | -0/+11 |
| | | | | | handling code in math.pow, in the hope of making all tests pass on the alpha Tru64 buildbot. | ||||
* | I finally got the time to update and merge Mark's and my trunk-math branch. ↵ | Christian Heimes | 2008-04-18 | 1 | -96/+344 |
| | | | | | | 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 :) | ||||
* | Neaten-up a bit. | Raymond Hettinger | 2008-02-02 | 1 | -5/+1 |
| | |||||
* | Move __builtins__.trunc() to math.trunc() per | Jeffrey Yasskin | 2008-02-01 | 1 | -0/+16 |
| | | | | | http://mail.python.org/pipermail/python-dev/2008-January/076626.html and issue 1965. | ||||
* | setup.py doesn't pick up changes to a header file | Christian Heimes | 2008-01-25 | 1 | -4/+4 |
| | |||||
* | Add prototypes to get the mathmodule.c to compile on OSF1 5.1 (Tru64) | Neal Norwitz | 2008-01-25 | 1 | -0/+5 |
| | | | | | 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. | ||||
* | Continue rolling back pep-3141 changes that changed behavior from 2.5. This | Jeffrey Yasskin | 2008-01-05 | 1 | -44/+6 |
| | | | | | | | | | | | | 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. | ||||
* | Fixed math.copysign() on Windows | Christian Heimes | 2008-01-04 | 1 | -6/+8 |
| | |||||
* | Added copysign(x, y) function to the math module | Christian Heimes | 2008-01-03 | 1 | -0/+11 |
| | |||||
* | Added math.isinf() and math.isnan() | Christian Heimes | 2008-01-03 | 1 | -6/+34 |
| | |||||
* | Backport PEP 3141 from the py3k branch to the trunk. This includes r50877 (just | Jeffrey Yasskin | 2008-01-03 | 1 | -6/+44 |
| | | | | | | | 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. | ||||
* | Speed up function calls into the math module by using METH_O. | Neal Norwitz | 2006-11-19 | 1 | -63/+55 |
| | | | | | There should be no functional changes. However, the error msgs are slightly different. Also verified that the module dict is not NULL on init. | ||||
* | Whoops. | Georg Brandl | 2006-05-29 | 1 | -2/+6 |
| | |||||
* | Convert more modules to METH_VARARGS. | Georg Brandl | 2006-05-29 | 1 | -6/+2 |
| | |||||
* | Check return result from Py_InitModule*(). This API can fail. | Neal Norwitz | 2006-01-19 | 1 | -0/+2 |
| | | | | Probably should be backported. | ||||
* | Make that a C, not a C++, comment. | Michael W. Hudson | 2005-04-06 | 1 | -1/+1 |
| | |||||
* | Add a comment explaining the import of longintrepr.h. | Michael W. Hudson | 2005-04-06 | 1 | -1/+1 |
| | |||||
* | Patch #871657: Set EDOM for `nan' return values on FreeBSD and OpenBSD. | Hye-Shik Chang | 2004-03-22 | 1 | -5/+5 |
| | | | | This fixes a problem that math.sqrt(-1) doesn't raise math.error. | ||||
* | Getting rid of support for the ancient Apple MPW compiler. | Jack Jansen | 2003-11-19 | 1 | -13/+0 |
| | |||||
* | Simplify and speedup uses of Py_BuildValue(): | Raymond Hettinger | 2003-10-12 | 1 | -6/+2 |
| | | | | | | * 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) | ||||
* | SF patch #659536: Use PyArg_UnpackTuple where possible. | Raymond Hettinger | 2002-12-29 | 1 | -2/+2 |
| | | | | | | | 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. | ||||
* | Apply SF patch 652930: Add optional base argument to math.log(x[, base]). | Raymond Hettinger | 2002-12-14 | 1 | -15/+47 |
| | |||||
* | Excise DL_EXPORT/DL_IMPORT from Modules/*. Required adding a prototype | Mark Hammond | 2002-08-02 | 1 | -1/+1 |
| | | | | | | for Py_Main(). Thanks to Kalle Svensson and Skip Montanaro for the patches. | ||||
* | Patch #568124: Add doc string macros. | Martin v. Löwis | 2002-06-13 | 1 | -18/+18 |
| | |||||
* | Added degrees() and radians() to mathmodule. Closes patch 552452 and | Raymond Hettinger | 2002-05-13 | 1 | -0/+27 |
| | | | | feature request 426539. | ||||
* | Revert parts of patch #453627, documenting the resulting test failures | Martin v. Löwis | 2001-09-06 | 1 | -17/+1 |
| | | | | instead. | ||||
* | Rework the way we try to check for libm overflow, given that C99 no longer | Tim Peters | 2001-09-05 | 1 | -29/+13 |
| | | | | | | | | | | | | | | | 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. |