Commit 10e1bf2f authored by Peter Schneider-Kamp's avatar Peter Schneider-Kamp

remove all occurence of math.rint() from the sources

(and yes, "Currintly" also counts <0.5 wink>)
parent 0707fea5
......@@ -97,11 +97,6 @@ carry the sign of \var{x}. The integer part is returned as a real.
Return \code{\var{x}**\var{y}}.
\end{funcdesc}
\begin{funcdesc}{rint}{x, y}
Return the integer nearest to \var{x} as a real.
(Only available on platforms where this is in the standard C math library.)
\end{funcdesc}
\begin{funcdesc}{sin}{x}
Return the sine of \var{x}.
\end{funcdesc}
......
......@@ -55,7 +55,6 @@ extern double hypot(double, double);
#undef log
#undef log10
#undef pow
#undef rint
#undef sin
#undef sinh
#undef sqrt
......@@ -75,7 +74,6 @@ extern double hypot(double, double);
#define log logd
#define log10 log10d
#define pow powd
#define rint rintd
#define sin sind
#define sinh sinhd
#define sqrt sqrtd
......
......@@ -193,7 +193,6 @@ extern double hypot(double, double);
#undef log
#undef log10
#undef pow
#undef rint
#undef sin
#undef sinh
#undef sqrt
......@@ -213,7 +212,6 @@ extern double hypot(double, double);
#define log logd
#define log10 log10d
#define pow powd
#define rint rintd
#define sin sind
#define sinh sinhd
#define sqrt sqrtd
......
......@@ -390,7 +390,7 @@ class Profile:
# more carefully the number of events (and cumulatively, the number
# of events during sub functions) that are seen. If this were
# done, then the arithmetic could be done after the fact (i.e., at
# display time). Currintly, we track only call/return events.
# display time). Currently, we track only call/return events.
# These values can be deduced by examining the callees and callers
# vectors for each functions. Hence we *can* almost correct the
# internal time figure at print time (note that we currently don't
......
......@@ -19,7 +19,6 @@ log
log10
modf
pow
rint
sin
sinh
sqrt
......
......@@ -129,18 +129,6 @@ testit('pow(1,0)', math.pow(1,0), 1)
testit('pow(2,1)', math.pow(2,1), 2)
testit('pow(2,-1)', math.pow(2,-1), 0.5)
print 'rint'
try:
math.rint
except AttributeError:
# this platform does not have rint, that is fine, skip the test
pass
else:
testit('rint(0.7)', math.rint(0.7), 1)
testit('rint(-0.3)', math.rint(-0.3), 0)
testit('rint(2.5)', math.rint(2.5), 2)
testit('rint(3.5)', math.rint(3.5), 4)
print 'sin'
testit('sin(0)', math.sin(0), 0)
testit('sin(pi/2)', math.sin(math.pi/2), 1)
......
......@@ -129,10 +129,6 @@ FUNC2(pow, power,
FUNC2(pow, pow,
"pow(x,y)\n\nReturn x**y.")
#endif
#ifdef HAVE_RINT
FUNC1(rint, rint,
"rint(x)\n\nReturn the integer nearest to x as a real.")
#endif
FUNC1(sin, sin,
"sin(x)\n\nReturn the sine of x.")
FUNC1(sinh, sinh,
......@@ -240,9 +236,6 @@ static PyMethodDef math_methods[] = {
{"log10", math_log10, METH_VARARGS, math_log10_doc},
{"modf", math_modf, METH_VARARGS, math_modf_doc},
{"pow", math_pow, METH_VARARGS, math_pow_doc},
#ifdef HAVE_RINT
{"rint", math_rint, METH_VARARGS, math_rint_doc},
#endif
{"sin", math_sin, METH_VARARGS, math_sin_doc},
{"sinh", math_sinh, METH_VARARGS, math_sinh_doc},
{"sqrt", math_sqrt, METH_VARARGS, math_sqrt_doc},
......
This diff is collapsed.
......@@ -1075,12 +1075,6 @@ LIBS="$LIBS $LIBM"
AC_REPLACE_FUNCS(hypot)
LIBS=$LIBS_SAVE
# check for rint() in math library
LIBS_SAVE=$LIBS
LIBS="$LIBS $LIBM"
AC_CHECK_FUNCS(rint)
LIBS=$LIBS_SAVE
# check for getopt
AC_MSG_CHECKING(for genuine getopt)
AC_CACHE_VAL(ac_cv_func_getopt,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment