mirror of
https://github.com/python/cpython.git
synced 2025-11-28 06:06:26 +00:00
Fixed math.copysign() on Windows
This commit is contained in:
parent
654ede7ef4
commit
66ecda4990
1 changed files with 8 additions and 6 deletions
|
|
@ -133,14 +133,16 @@ FUNC1(cos, cos,
|
||||||
"cos(x)\n\nReturn the cosine of x (measured in radians).")
|
"cos(x)\n\nReturn the cosine of x (measured in radians).")
|
||||||
FUNC1(cosh, cosh,
|
FUNC1(cosh, cosh,
|
||||||
"cosh(x)\n\nReturn the hyperbolic cosine of x.")
|
"cosh(x)\n\nReturn the hyperbolic cosine of x.")
|
||||||
#if defined(MS_WINDOWS) || defined(HAVE_COPYSIGN)
|
|
||||||
#ifdef MS_WINDOWS
|
#ifdef MS_WINDOWS
|
||||||
FUNC2(copysign, _copysign,
|
# define copysign _copysign
|
||||||
#else
|
# define HAVE_COPYSIGN 1
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_COPYSIGN
|
||||||
FUNC2(copysign, copysign,
|
FUNC2(copysign, copysign,
|
||||||
|
"copysign(x,y)\n\nReturn x with the sign of y.");
|
||||||
#endif
|
#endif
|
||||||
"copysign(x,y)\n\nReturn x with the sign of y.");
|
|
||||||
#endif
|
|
||||||
FUNC1(exp, exp,
|
FUNC1(exp, exp,
|
||||||
"exp(x)\n\nReturn e raised to the power of x.")
|
"exp(x)\n\nReturn e raised to the power of x.")
|
||||||
FUNC1(fabs, fabs,
|
FUNC1(fabs, fabs,
|
||||||
|
|
@ -383,7 +385,7 @@ static PyMethodDef math_methods[] = {
|
||||||
{"atan", math_atan, METH_O, math_atan_doc},
|
{"atan", math_atan, METH_O, math_atan_doc},
|
||||||
{"atan2", math_atan2, METH_VARARGS, math_atan2_doc},
|
{"atan2", math_atan2, METH_VARARGS, math_atan2_doc},
|
||||||
{"ceil", math_ceil, METH_O, math_ceil_doc},
|
{"ceil", math_ceil, METH_O, math_ceil_doc},
|
||||||
#if defined(MS_WINDOWS) || defined(HAVE_COPYSIGN)
|
#ifdef HAVE_COPYSIGN
|
||||||
{"copysign", math_copysign, METH_VARARGS, math_copysign_doc},
|
{"copysign", math_copysign, METH_VARARGS, math_copysign_doc},
|
||||||
#endif
|
#endif
|
||||||
{"cos", math_cos, METH_O, math_cos_doc},
|
{"cos", math_cos, METH_O, math_cos_doc},
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue