Commit Graph

133 Commits

Author SHA1 Message Date
Mark Dickinson
a024f80a71 Issue #21902: Replace incorrect 'hyperbolic arc sine' (etc.) with 'inverse hyperbolic sine' (etc.). Remove meaningless reference to radians. 2015-01-11 13:03:06 +00:00
Mark Dickinson
36f6e2c9e0 Issue #18739: Fix inconsistent results from math.log(n) and math.log(long(n)) 2013-10-13 10:55:15 +01:00
Mark Dickinson
32a16cac70 Fix indentation of Python code example in C comment. 2010-06-25 20:19:48 +00:00
Mark Dickinson
e979ec8fbf 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.
2010-06-13 10:50:29 +00:00
Antoine Pitrou
c83ea137d7 Untabify C files. Will watch buildbots. 2010-05-09 14:46:46 +00:00
Mark Dickinson
f132c16199 Make use of PyLong_AsLongAndOverflow in math_ldexp. 2010-01-03 12:03:03 +00:00
Mark Dickinson
d3e323215c 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.
2010-01-02 14:45:40 +00:00
Mark Dickinson
12748b003c Issue #7518: Move substitute definitions of C99 math functions from
pymath.c to Modules/_math.c.
2009-12-21 15:22:00 +00:00
Mark Dickinson
5698977186 math.factorial depends on PyLong_AsLong correctly converting floats; rewrite
it to do the conversion explicitly instead.  See issue #7550.
2009-12-20 13:58:18 +00:00
Mark Dickinson
5ff37ae14b Issue #3366: Add error function and complementary error function to
math module.
2009-12-19 11:07:23 +00:00
Mark Dickinson
9cae178f21 Issue #3366: Add expm1 function to math module. Thanks Eric Smith for
testing on Windows.
2009-12-16 20:13:40 +00:00
Mark Dickinson
9be87bc992 Issue #3366: Add lgamma function to math module. 2009-12-11 17:29:33 +00:00
Georg Brandl
a8f8bed203 Use a single style for all the docstrings in the math module. 2009-10-29 20:54:03 +00:00
Georg Brandl
40777e6606 Use the correct function name in docstring. 2009-10-29 20:38:32 +00:00
Mark Dickinson
b93fff0a57 Issue #3366: Add gamma function to math module.
(lgamma, erf and erfc to follow).
2009-09-28 18:54:55 +00:00
Benjamin Peterson
9de7298102 remove redundant sentence 2008-12-20 22:49:24 +00:00
Benjamin Peterson
fed67fd41e beef up docstring 2008-12-20 02:57:19 +00:00
Mark Dickinson
4c96fa5525 Issues #3167, #3682: tests for math.log and math.log10 were failing on
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.
2008-12-11 19:28:08 +00:00
Mark Dickinson
ff3fdce0d2 Replace math.sum with math.fsum in a couple of comments
that were missed by r65308
2008-07-30 16:25:16 +00:00
Mark Dickinson
fef6b13c32 Rename math.sum to math.fsum 2008-07-30 16:20:10 +00:00
Mark Dickinson
abe0aee3cf Fix special-value handling for math.sum.
Also minor cleanups to the code: fix tabbing, remove
trailing whitespace, and reformat to fit into 80
columns.
2008-07-30 12:01:41 +00:00
Mark Dickinson
2fcd8c9703 Fix another typo in math_sum comment 2008-06-20 15:26:19 +00:00
Andrew M. Kuchling
5f198bee4e Fix comment typos 2008-06-20 02:11:42 +00:00
Raymond Hettinger
2281da42b0 Fix double decref. 2008-06-18 00:56:57 +00:00
Mark Dickinson
fb1c4b98e9 Issue 3118: make test_math pass on Ubuntu/ia64. exp(-745.0) was raising
OverflowError incorrectly on this platform, presumably as a result of
the libm setting errno = ERANGE for this call.
2008-06-17 21:16:55 +00:00