Commit Graph

249 Commits

Author SHA1 Message Date
Guido van Rossum
c9a5f343bc The addition of rint() (by Peter Schneider-Kamp; I forgot to mention
that before) in the previous patch has one problem; rint() is not in
the C math library on all platforms (e.g. not for VC++).  Make it
conditional on HAVE_RINT.
2000-05-11 18:42:27 +00:00
Guido van Rossum
71260b846e Added math.rint() -- round according to current IEEE754 mode 2000-05-11 18:19:42 +00:00
Guido van Rossum
c554505ca1 Trent Mick:
Fix overflow bug in ldexp(x, exp). The 'exp' argument maps to a C int for the
math library call [double ldexp(double, int)], however the 'd'
PyArg_ParseTuple formatter was used to yield a double, which was subsequently
cast to an int. This could overflow.

[GvR: mysteriously, on Solaris 2.7, ldexp(1, 2147483647) returns Inf
while ldexp(1, 2147483646) raises OverflowError; this seems a bug in
the math library (it also takes a real long time to compute the
Inf outcome).  Does this point to a bug in the CHECK() macro?  It
should have discovered that the result was outside the HUGE_VAL range.]
2000-05-08 14:29:38 +00:00
Guido van Rossum
b057dd8efa Correctly document atan2. 1998-12-08 16:27:10 +00:00
Guido van Rossum
c6e22902ad Added Doc strings -- by Chris Petrilli. 1998-12-04 19:26:43 +00:00
Guido van Rossum
3886bb6997 Add DL_EXPORT() to all modules that could possibly be used
on BeOS or Windows.
1998-12-04 18:50:17 +00:00
Guido van Rossum
511f16357c Removed MetroWerks workaround, replaced by defines in mymath.h (Jack) 1997-05-20 15:59:04 +00:00
Guido van Rossum
45b83915f8 New form of PyFPE_END_PROTECT macro. 1997-03-14 04:32:50 +00:00
Guido van Rossum
52fa3a6909 Changes for Lee Busby's SIGFPE patch set.
Two new modules fpectl and fpetest.
Surround various and sundry f.p. operations with PyFPE_*_PROTECT macros.
1997-02-14 22:59:58 +00:00
Roger E. Masse
20c6381856 Removed references to getdoublearg and get2doublearg rename macros and
substituted the appropriate PyArg_Parse calls.  Retested.  All appears well.
1996-12-18 21:59:01 +00:00
Guido van Rossum
4a4880966b Correct *another* mistake (initmath() always fell through to fatal error).
Watch it, Barry! :-)
1996-12-18 14:14:33 +00:00
Guido van Rossum
4c4cbf397b Correct 1-char typo / syntax error. 1996-12-18 14:12:22 +00:00
Barry Warsaw
fc93f75da7 Better error checking in initmath(). 1996-12-17 00:47:03 +00:00
Barry Warsaw
8b43b19ec9 Renamed 1996-12-09 22:32:36 +00:00
Guido van Rossum
d266eb460e New permission notice, includes CNRI. 1996-10-25 14:44:06 +00:00
Guido van Rossum
213a685cd8 Move backup definition for hypot() to Python/hypot.c. 1996-08-29 18:13:16 +00:00
Guido van Rossum
3bcf7d2f0b Avoid complaint about inconsistent hypot() linkage on NT. 1996-08-21 20:36:52 +00:00
Guido van Rossum
6412b1de5d Hack for Mac (where fabs is not usable as a function pointer). 1996-08-08 19:10:21 +00:00
Guido van Rossum
557d6d6608 Don't make an exception for NeXT (BBUM says it's no longer needed).
(But hypot() should really be defined in a separate file, triggered by
configure.)
1996-07-30 20:44:31 +00:00
Guido van Rossum
7081cf54bf Microsoft C changes 1996-05-23 22:56:19 +00:00
Guido van Rossum
3206268692 added default hypot() implementation 1996-01-12 01:39:11 +00:00
Guido van Rossum
9caac91641 NeXT doesn't like me to declare hypot(double, double) 1995-06-14 22:17:37 +00:00
Guido van Rossum
6964f73b85 include mymath.h 1995-03-01 10:34:29 +00:00
Guido van Rossum
27fda28973 cleanup 1995-01-22 00:48:16 +00:00
Guido van Rossum
b9418686ba rearrange declarations somewhat 1995-01-12 11:28:16 +00:00