summaryrefslogtreecommitdiffstats
path: root/Modules/mathmodule.c
Commit message (Collapse)AuthorAgeFilesLines
* Issue #27895: Spelling fixes (Contributed by Ville Skyttä).Raymond Hettinger2016-08-301-1/+1
|
* Issue #12345: Add mathemathcal constant tau to math and cmath.Guido van Rossum2016-08-151-0/+1
| | | | Patch by Lisa Roach. See also PEP 628.
* Issue #26512: Merge rounding doc from 3.5Martin Panter2016-05-081-4/+4
|\
| * Issue #26512: Clarify Integral; tidy up table of rounding functionsMartin Panter2016-05-081-4/+4
| | | | | | | | Based on patch by Julien.
* | Issue #26898: Fix typo in math.isclose() docstringBerker Peksag2016-05-011-1/+1
|\ \ | |/ | | | | Patch by Marco Buttu.
| * Issue #26898: Fix typo in math.isclose() docstringBerker Peksag2016-05-011-1/+1
| | | | | | | | Patch by Marco Buttu.
* | Merge for issue #26114Brett Cannon2016-01-151-3/+2
|\ \ | |/
| * Issue #26114: Remove a reference to 'Numerical Recipes'.Brett Cannon2016-01-151-3/+2
| | | | | | | | | | | | While no copyright violation occurred, the license which 'Numerical Recipes' operates under is not amenable to Python, so to prevent confusion it's easier to simply remove its mention.
* | Issue #25923: Added more const qualifiers to signatures of static and ↵Serhiy Storchaka2015-12-251-2/+2
|/ | | | private functions.
* Issue #19543: Implementation of isclose as per PEP 485Tal Einat2015-05-311-0/+79
| | | | | | | | | For details, see: PEP 0485 -- A Function for testing approximate equality Functions added: math.isclose() and cmath.isclose(). Original code by Chris Barker. Patch by Tal Einat.
* Issue #22486: Added the math.gcd() function. The fractions.gcd() function ↵Serhiy Storchaka2015-05-121-0/+28
| | | | | | now is deprecated. Based on patch by Mark Dickinson.
* Issue #23641: Cleaned out legacy dunder names from tests and docs.Serhiy Storchaka2015-03-121-1/+1
|\ | | | | | | | | Fixed 2 to 3 porting bug in pynche.ColorDB. Added few tests for __truediv__, __floordiv__ and __matmul__.
| * Issue #23641: Cleaned out legacy dunder names from tests and docs.Serhiy Storchaka2015-03-121-1/+1
| | | | | | | | Fixed 2 to 3 porting bug in pynche.ColorDB.
* | Issue #21092: Merge from 3.4.Mark Dickinson2015-01-111-3/+3
|\ \ | |/
| * Issue #21902: Replace incorrect 'hyperbolic arc sine' (etc.) with 'inverse ↵Mark Dickinson2015-01-111-3/+3
| | | | | | | | hyperbolic sine' (etc.). Remove meaningless reference to radians.
* | Issue #23185: add math.inf and math.nan constants.Mark Dickinson2015-01-111-1/+34
| |
* | Issue #22207: Fix "comparison between signed and unsigned integers" warning inVictor Stinner2014-08-171-1/+1
| | | | | | | | | | test checking for integer overflow on Py_ssize_t type: cast explicitly to size_t.
* | Issue #20539: Improve math.factorial error messages and types for large inputs.Mark Dickinson2014-04-101-4/+12
|/ | | | | - Better message for the OverflowError in large positive inputs. - Changed exception type from OverflowError to ValueError for large negative inputs.
* #12211: remove paragraph about NaNsAndrew Kuchling2014-02-161-3/+1
|
* #12211: clarify math.copysign() documentation and docstringAndrew Kuchling2014-02-161-1/+5
|
* Issue #18783: Removed existing mentions of Python long type in docstrings,Serhiy Storchaka2013-08-271-7/+6
| | | | error messages and comments.
* Issue #16305: Merge fix from 3.2.Mark Dickinson2012-10-251-4/+3
|\
| * Fix math.factorial KeyboardInterrupt segfault. Thanks Amaury for report and ↵Mark Dickinson2012-10-251-4/+3
| | | | | | | | diagnosis.
* | merge 3.2Benjamin Peterson2012-03-131-7/+7
|\ \ | |/
| * fix indentationBenjamin Peterson2012-03-131-7/+7
| |
* | use the static identifier api for looking up special methodsBenjamin Peterson2012-01-221-6/+6
| | | | | | | | | | I had to move the static identifier code from unicodeobject.h to object.h in order for this to work.
* | Use the new Py_ARRAY_LENGTH macroVictor Stinner2011-09-281-1/+1
| |
* | Return +-Py_HUGE_VAL for tgamma(+-0) instead of risking FP exceptions by ↵Mark Dickinson2011-09-251-1/+2
| | | | | | | | computing 1.0 / 0.0.
* | Issue #11888: Use system log2() when availableVictor Stinner2011-05-091-0/+4
| | | | | | | | | | I expect the system libc to use more accurate functions than Python. The GNU libc uses for example FYL2X and FYL2XP1 hardware instructions on Intel FPU.
* | Grammatical fix for a comment for log2, to avoid referring to an *algorithm* ↵Mark Dickinson2011-05-091-1/+3
| | | | | | | | as monotonic.
* | Fix cut-and-paste typo in comment: log10 -> log2.Mark Dickinson2011-05-091-1/+1
| |
* | Issue #11888: Add log2 function to math module. Patch written by MarkVictor Stinner2011-05-081-0/+59
| | | | | | | | Dickinson.
* | Issue #11495: OSF support is eliminated. It was deprecated in Python 3.2Jesus Cea2011-03-141-5/+0
|/
* Issue #9599: Further accuracy tweaks to loghelper. For an integer n that's ↵Mark Dickinson2010-09-291-14/+22
| | | | small enough to be converted to a float without overflow, log(n) is now computed as log(float(n)), and similarly for log10.
* Issue #9599: Tweak loghelper algorithm to return slightly improved results ↵Mark Dickinson2010-09-281-6/+8
| | | | for powers of 2.
* Improve docstrings for isnan, isinf and isfinite.Mark Dickinson2010-07-111-3/+3
|
* Issue #9165: Add math.isfinite and cmath.isfinite.Mark Dickinson2010-07-111-0/+14
|
* Fix typo in a comment in mathmodule.c.Ezio Melotti2010-07-081-1/+1
|
* Issue #9186: log1p(-1.0) should raise ValueError, not OverflowError.Mark Dickinson2010-07-071-1/+1
|
* Minor refactoring in lgamma code, for clarity.Mark Dickinson2010-07-071-14/+10
|
* Style/consistency nit: make math_floor and math_ceil code look the same.Mark Dickinson2010-07-021-6/+4
|
* fix lookup of __ceil__Benjamin Peterson2010-07-021-9/+9
|
* account for different ref counting semantics of _PyObject_LookupSpecialBenjamin Peterson2010-07-021-4/+8
|
* correctly lookup __trunc__ and __floor__Benjamin Peterson2010-07-011-20/+11
|
* Merged revisions 82221 via svnmerge fromMark Dickinson2010-06-251-11/+11
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r82221 | mark.dickinson | 2010-06-25 21:19:48 +0100 (Fri, 25 Jun 2010) | 1 line Fix indentation of Python code example in C comment. ........
* Merged revisions 81967 via svnmerge fromMark Dickinson2010-06-131-6/+16
| | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r81967 | mark.dickinson | 2010-06-13 11:50:29 +0100 (Sun, 13 Jun 2010) | 4 lines Issue #8986: erfc was raising OverflowError on Linux for arguments in the (approximate) range (-27.3, 30.0), as a result of an escaped errno value. ........
* Issue #8692: Improve performance of math.factorial:Mark Dickinson2010-05-151-20/+240
| | | | | | | | | | | | | (1) use a different algorithm that roughly halves the total number of multiplications required and results in more balanced multiplications (2) use a lookup table for small arguments (3) fast accumulation of products in C integer arithmetic rather than PyLong arithmetic when possible. Typical speedup, from unscientific testing on a 64-bit laptop, is 4.5x to 6.5x for arguments in the range 100 - 10000. Patch by Daniel Stutzbach; extensive reviews by Alexander Belopolsky.
* Recorded merge of revisions 81029 via svnmerge fromAntoine Pitrou2010-05-091-1002/+1002
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r81029 | antoine.pitrou | 2010-05-09 16:46:46 +0200 (dim., 09 mai 2010) | 3 lines Untabify C files. Will watch buildbots. ........
* Merged revisions 77275 via svnmerge fromMark Dickinson2010-01-031-16/+6
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r77275 | mark.dickinson | 2010-01-03 12:03:03 +0000 (Sun, 03 Jan 2010) | 1 line Make use of PyLong_AsLongAndOverflow in math_ldexp. ........
* Merged revisions 77234 via svnmerge fromMark Dickinson2010-01-021-12/+15
| | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r77234 | mark.dickinson | 2010-01-02 14:45:40 +0000 (Sat, 02 Jan 2010) | 7 lines Refactor some longobject internals: PyLong_AsDouble and _PyLong_AsScaledDouble (the latter renamed to _PyLong_Frexp) now use the same core code. The exponent produced by _PyLong_Frexp now has type Py_ssize_t instead of the previously used int, and no longer needs scaling by PyLong_SHIFT. This frees the math module from having to know anything about the PyLong implementation. This closes issue #5576. ........