summaryrefslogtreecommitdiffstats
path: root/Modules/cmathmodule.c
Commit message (Collapse)AuthorAgeFilesLines
* #11565: Fix several typos. Patch by Piotr Kasprzyk.Ezio Melotti2011-03-161-1/+1
|
* Untabify C files. Will watch buildbots.Antoine Pitrou2010-05-091-800/+800
|
* Issue #7518: Move substitute definitions of C99 math functions fromMark Dickinson2009-12-211-5/+6
| | | | pymath.c to Modules/_math.c.
* Issue #6644: Fix compile error on AIX.Mark Dickinson2009-08-041-1/+1
|
* Issue #5393: typo in cmath.cos and cmath.cosh docstringMark Dickinson2009-02-281-2/+2
|
* Minor rewrite of cmath_log to work around a Sun compiler bug. See issueMark Dickinson2008-07-051-2/+4
| | | | #3168.
* Following Amaury's adviceChristian Heimes2008-05-161-1/+1
|
* Fixed #2870: cmathmodule.c compile errorChristian Heimes2008-05-161-1/+1
|
* Even more fixes for alpha Tru64, this time forMark Dickinson2008-04-201-1/+10
| | | | the phase and polar methods.
* Issue 2662: Initialize special value tables dynamically (i.e. whenMark Dickinson2008-04-201-109/+128
| | | | | | | | cmath module is loaded) instead of statically. This fixes compile-time problems on platforms where HUGE_VAL is an extern variable rather than a constant. Thanks Hirokazu Yamamoto for the patch.
* I finally got the time to update and merge Mark's and my trunk-math branch. ↵Christian Heimes2008-04-181-133/+886
| | | | | | 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 :)
* Check return result from Py_InitModule*(). This API can fail.Neal Norwitz2006-01-191-0/+2
| | | | Probably should be backported.
* Patch #826074: cmath.log optional base argument, fixes #823209Raymond Hettinger2004-06-141-7/+27
| | | | (Contributed by Andrew Gaul.)
* Excise DL_EXPORT/DL_IMPORT from Modules/*. Required adding a prototypeMark Hammond2002-08-021-1/+1
| | | | | | for Py_Main(). Thanks to Kalle Svensson and Skip Montanaro for the patches.
* staticforward bites the dust.Jeremy Hylton2002-07-171-3/+3
| | | | | | | | | | | | | | | The staticforward define was needed to support certain broken C compilers (notably SCO ODT 3.0, perhaps early AIX as well) botched the static keyword when it was used with a forward declaration of a static initialized structure. Standard C allows the forward declaration with static, and we've decided to stop catering to broken C compilers. (In fact, we expect that the compilers are all fixed eight years later.) I'm leaving staticforward and statichere defined in object.h as static. This is only for backwards compatibility with C extensions that might still use it. XXX I haven't updated the documentation.
* Patch #568124: Add doc string macros.Martin v. Löwis2002-06-131-34/+34
|
* Use the PyModule_*() API instead of manipulating the module dictionaryFred Drake2002-04-011-7/+5
| | | | directly.
* SF bug 525705: [2.2] underflow raise OverflowException.Tim Peters2002-03-091-2/+1
| | | | | | | | | | | | | | | | | | | | Another year in the quest to out-guess random C behavior. Added macros Py_ADJUST_ERANGE1(X) and Py_ADJUST_ERANGE2(X, Y). The latter is useful for functions with complex results. Two corrections to errno- after-libm-call are attempted: 1. If the platform set errno to ERANGE due to underflow, clear errno. Some unknown subset of libm versions and link options do this. It's allowed by C89, but I never figured anyone would do it. 2. If the platform did not set errno but overflow occurred, force errno to ERANGE. C89 required setting errno to ERANGE, but C99 doesn't. Some unknown subset of libm versions and link options do it the C99 way now. Bugfix candidate, but hold off until some Linux people actually try it, with and without -lieee. I'll send a help plea to Python-Dev.
* Revert parts of patch #453627, documenting the resulting test failuresMartin v. Löwis2001-09-061-18/+2
| | | | instead.
* Rework the way we try to check for libm overflow, given that C99 no longerTim Peters2001-09-051-15/+2
| | | | | | | | | | | | | | | 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.
* Patch #453627: Define the following macros when compiling on a UnixWare 7.x ↵Martin v. Löwis2001-09-051-2/+18
| | | | | | | system: SCO_ATAN2_BUG, SCO_ACCEPT_BUG, and STRICT_SYSV_CURSES. Work aroudn a bug in the SCO UnixWare atan2() implementation.
* asin micro-optimization suggested in email.Tim Peters2001-02-221-2/+3
|
* Bug #133297: cmath.asin is the same as cmath.asinh.Tim Peters2001-02-211-8/+9
| | | | | | | | | | | | | The bug report title isn't correct, but was on the right track. Rev 2.13 applied a patch intended to improve asinh and acosh, but the author mistakenly replaced the body of asin with their new code for asinh. See bug report for all the gory details. This patch: (a) puts the "new" (as of 2.13) asinh code into the asinh function; and, (b) repairs asin via what Abramowitz & Stegun say it should be (which is probably the same as what 2.12 did for asin, although I got tired of matching parentheses before being 100% sure of that -- and I don't care! The source of the old code is a mystery, and I *know* why I picked the new code.).
* Rename some constants for easier readability.Tim Peters2001-02-201-8/+8
|
* Mechanical edits just so I can read it.Tim Peters2001-02-201-142/+138
|
* Use METH_VARARGS instead of numeric constant 1 in method def. tablesAndrew M. Kuchling2000-08-031-16/+32
|
* merge Include/my*.h into Include/pyport.hPeter Schneider-Kamp2000-07-311-2/+0
| | | | marked my*.h as obsolete
* Fix typo in previous patch.Thomas Wouters2000-07-241-3/+3
|
* *** empty log message ***Thomas Wouters2000-07-241-3/+3
|
* Bunch of minor ANSIfications: 'void initfunc()' -> 'void initfunc(void)',Thomas Wouters2000-07-211-2/+2
| | | | | | | | | | | | | | | | | | 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 ;)
* ANSI-ficationPeter Schneider-Kamp2000-07-101-38/+19
|
* Nuke all remaining occurrences of Py_PROTO and Py_FPROTO.Tim Peters2000-07-091-1/+1
|
* Patch by Nadav Horesh to make acosh and asinh better.Guido van Rossum2000-06-301-7/+12
| | | | | | | Tim posted a long comment to python-dev (subject: "Controversial patch (cmath)"; date: 6/29/00). The conclusion is that this whole module stinks and this patch isn't perfect, but it's better than the acosh and asinh we had, so let's check it in.
* Docstring fix: acosh() returns the hyperbolic arccosine, not theFred Drake1999-03-161-1/+1
| | | | | hyperbolic cosine. Problem report via David Ascher by one of his students.
* Jim Ahlstrom patch: Watcom chokes on a long expression in c_asinh().Guido van Rossum1999-01-141-1/+5
| | | | Break it up.
* Added Doc strings -- by Chris Petrilli.Guido van Rossum1998-12-041-17/+119
|
* Add DL_EXPORT() to all modules that could possibly be usedGuido van Rossum1998-12-041-1/+1
| | | | on BeOS or Windows.
* New form of PyFPE_END_PROTECT macro.Guido van Rossum1997-03-141-1/+1
|
* Changes for Lee Busby's SIGFPE patch set.Guido van Rossum1997-02-141-0/+2
| | | | | Two new modules fpectl and fpetest. Surround various and sundry f.p. operations with PyFPE_*_PROTECT macros.
* Removed redundant inclusion of <errno.h> (sorry, Roj!).Guido van Rossum1996-12-101-2/+0
|
* Renamed GrandlyRoger E. Masse1996-12-091-19/+19
|
* Keep gcc -Wall happy.Guido van Rossum1996-12-051-0/+2
|
* complex -> Py_complexGuido van Rossum1996-07-211-56/+56
|
* Made all c_* symbols static.Guido van Rossum1996-05-241-20/+20
|
* complex mathGuido van Rossum1996-01-121-0/+314