summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_math.py
Commit message (Collapse)AuthorAgeFilesLines
* Whitespace normalization.Tim Peters2002-05-231-1/+1
|
* Adds tests for degrees() and radians() functions added to mathmodule.Raymond Hettinger2002-05-131-0/+10
| | | | Closes patch 552452 and feature request 426539.
* Rework the way we try to check for libm overflow, given that C99 no longerTim Peters2001-09-051-1/+1
| | | | | | | | | | | | | | | 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.
* Reverting the "unixware7" patch: atan2(0, 1) should be 0, regardless ofTim Peters2001-04-121-5/+1
| | | | | platform. If it returns pi on the unixware7 platform, they have a bug in their libm atan2.
* Unixware 7 support by Billy G. Allie (SF patch 413011)Guido van Rossum2001-04-111-1/+5
|
* Update the code to better reflect recommended style:Fred Drake2000-12-121-1/+1
| | | | | Use != instead of <> since <> is documented as "obsolescent". Use "is" and "is not" when comparing with None or type objects.
* Make reindent.py happy (convert everything to 4-space indents!).Fred Drake2000-10-231-9/+9
|
* Test for math.* exceptional behavior only in verbose mode, so that theTim Peters2000-10-161-30/+40
| | | | | oddball platforms (where, e.g., math.exp(+huge) still fails to raise OverflowError) don't fail the std test suite when run normally.
* A Mystery: I somehow managed to delete the last two lines of my test_math.pyTim Peters2000-10-121-0/+2
| | | | changes. Here restoring them.
* Stop raising OverflowError on underflows reported by libm (errno==ERANGE andTim Peters2000-10-121-0/+29
| | | | | | | | | libm result is 0). Cautiously add a few libm exception test cases: 1. That exp(-huge) returns 0 without exception. 2. That exp(+huge) triggers OverflowError. 3. That sqrt(-1) raises ValueError specifically (apparently under glibc linked with -lieee, it was raising OverflowError due to an accident of the way mathmodule.c's CHECK() macro happened to deal with Infs and NaNs under gcc).
* remove all occurence of math.rint() from the sourcesPeter Schneider-Kamp2000-08-101-12/+0
| | | | (and yes, "Currintly" also counts <0.5 wink>)
* Trent Mick <trentm@activestate.com>:Fred Drake2000-06-011-4/+10
| | | | | Fix test of the "math" module so it does not break on platforms that do not offer rint(); just skip that portion of the test in that case.
* Added math.rint() -- round according to current IEEE754 modeGuido van Rossum2000-05-111-0/+6
|
* Subtle hack so the eps printed is not dependent on the formattingGuido van Rossum1996-08-291-2/+3
| | | | habits of the C library we happen to use...
* Added test for math moduleGuido van Rossum1996-08-081-0/+153