Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
10e1bf2f
Commit
10e1bf2f
authored
Aug 10, 2000
by
Peter Schneider-Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove all occurence of math.rint() from the sources
(and yes, "Currintly" also counts <0.5 wink>)
parent
0707fea5
Changes
9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
90 additions
and
133 deletions
+90
-133
Doc/lib/libmath.tex
Doc/lib/libmath.tex
+0
-5
Include/mymath.h
Include/mymath.h
+0
-2
Include/pyport.h
Include/pyport.h
+0
-2
Lib/profile.py
Lib/profile.py
+1
-1
Lib/test/output/test_math
Lib/test/output/test_math
+0
-1
Lib/test/test_math.py
Lib/test/test_math.py
+0
-12
Modules/mathmodule.c
Modules/mathmodule.c
+0
-7
configure
configure
+89
-97
configure.in
configure.in
+0
-6
No files found.
Doc/lib/libmath.tex
View file @
10e1bf2f
...
...
@@ -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}
...
...
Include/mymath.h
View file @
10e1bf2f
...
...
@@ -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
...
...
Include/pyport.h
View file @
10e1bf2f
...
...
@@ -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
...
...
Lib/profile.py
View file @
10e1bf2f
...
...
@@ -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). Curr
i
ntly, we track only call/return events.
# display time). Curr
e
ntly, 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
...
...
Lib/test/output/test_math
View file @
10e1bf2f
...
...
@@ -19,7 +19,6 @@ log
log10
modf
pow
rint
sin
sinh
sqrt
...
...
Lib/test/test_math.py
View file @
10e1bf2f
...
...
@@ -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
)
...
...
Modules/mathmodule.c
View file @
10e1bf2f
...
...
@@ -129,10 +129,6 @@ FUNC2(pow, power,
FUNC2
(
pow
,
pow
,
"pow(x,y)
\n\n
Return x**y."
)
#endif
#ifdef HAVE_RINT
FUNC1
(
rint
,
rint
,
"rint(x)
\n\n
Return the integer nearest to x as a real."
)
#endif
FUNC1
(
sin
,
sin
,
"sin(x)
\n\n
Return 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
},
...
...
configure
View file @
10e1bf2f
This diff is collapsed.
Click to expand it.
configure.in
View file @
10e1bf2f
...
...
@@ -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,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment