summaryrefslogtreecommitdiffstats
path: root/Modules/cmathmodule.c
Commit message (Collapse)AuthorAgeFilesLines
* 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