mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
Merge alpha100 branch back to main trunk
This commit is contained in:
parent
2979b01ff8
commit
b6775db241
176 changed files with 5302 additions and 3668 deletions
|
@ -1,5 +1,5 @@
|
|||
/***********************************************************
|
||||
Copyright 1991, 1992, 1993 by Stichting Mathematisch Centrum,
|
||||
Copyright 1991, 1992, 1993, 1994 by Stichting Mathematisch Centrum,
|
||||
Amsterdam, The Netherlands.
|
||||
|
||||
All Rights Reserved
|
||||
|
@ -40,9 +40,11 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|||
#undef HUGE_VAL
|
||||
#endif
|
||||
|
||||
#ifndef macintosh
|
||||
#ifndef __STDC__
|
||||
extern double fmod PROTO((double, double));
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef HUGE_VAL
|
||||
#define CHECK(x) if (errno != 0) ; \
|
||||
|
@ -132,10 +134,14 @@ FUNC1(math_sqrt, sqrt)
|
|||
FUNC1(math_tan, tan)
|
||||
FUNC1(math_tanh, tanh)
|
||||
|
||||
#ifndef macintosh
|
||||
|
||||
double frexp PROTO((double, int *));
|
||||
double ldexp PROTO((double, int));
|
||||
double modf PROTO((double, double *));
|
||||
|
||||
#endif
|
||||
|
||||
static object *
|
||||
math_frexp(self, args)
|
||||
object *self;
|
||||
|
@ -180,7 +186,15 @@ math_modf(self, args)
|
|||
if (!getdoublearg(args, &x))
|
||||
return NULL;
|
||||
errno = 0;
|
||||
#ifdef MPW /* MPW C modf expects pointer to extended as second argument */
|
||||
{
|
||||
extended e;
|
||||
x = modf(x, &e);
|
||||
y = e;
|
||||
}
|
||||
#else
|
||||
x = modf(x, &y);
|
||||
#endif
|
||||
CHECK(x);
|
||||
if (errno != 0)
|
||||
return math_error();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue