summaryrefslogtreecommitdiffstats
path: root/Modules/mathmodule.c
Commit message (Collapse)AuthorAgeFilesLines
* Issue #29282: Backed out changeset b33012ef1417Mark Dickinson2017-01-211-42/+0
|
* Issue #29282: add fused multiply-add function, math.fma.Mark Dickinson2017-01-211-0/+42
|
* Issue #20186: Converted the math module to Argument Clinic.Serhiy Storchaka2017-01-191-247/+384
| | | | Patch by Tal Einat.
* Use _PyObject_CallNoArg()Victor Stinner2016-12-061-3/+3
| | | | | | | Replace: PyObject_CallFunctionObjArgs(callable, NULL) with: _PyObject_CallNoArg(callable)
* Backed out changeset b9c9691c72c5Victor Stinner2016-12-041-3/+3
| | | | | | Issue #28858: The change b9c9691c72c5 introduced a regression. It seems like _PyObject_CallArg1() uses more stack memory than PyObject_CallFunctionObjArgs().
* Replace PyObject_CallFunctionObjArgs() with fastcallVictor Stinner2016-12-011-3/+3
| | | | | | | | | | | | | | * PyObject_CallFunctionObjArgs(func, NULL) => _PyObject_CallNoArg(func) * PyObject_CallFunctionObjArgs(func, arg, NULL) => _PyObject_CallArg1(func, arg) PyObject_CallFunctionObjArgs() allocates 40 bytes on the C stack and requires extra work to "parse" C arguments to build a C array of PyObject*. _PyObject_CallNoArg() and _PyObject_CallArg1() are simpler and don't allocate memory on the C stack. This change is part of the fastcall project. The change on listsort() is related to the issue #23507.
* 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
|