Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
8e5446f9
Kaydet (Commit)
8e5446f9
authored
Nis 18, 2009
tarafından
Mark Dickinson
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Backport r71704 (add configure check for C99 round function) to trunk.
üst
4beb89b9
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
24 additions
and
3 deletions
+24
-3
pymath.h
Include/pymath.h
+4
-0
pymath.c
Python/pymath.c
+13
-0
configure
configure
+3
-2
configure.in
configure.in
+1
-1
pyconfig.h.in
pyconfig.h.in
+3
-0
No files found.
Include/pymath.h
Dosyayı görüntüle @
8e5446f9
...
...
@@ -22,6 +22,10 @@ functions and constants
extern
double
copysign
(
double
,
double
);
#endif
#ifndef HAVE_ROUND
extern
double
round
(
double
);
#endif
#ifndef HAVE_ACOSH
extern
double
acosh
(
double
);
#endif
...
...
Python/pymath.c
Dosyayı görüntüle @
8e5446f9
...
...
@@ -47,6 +47,19 @@ copysign(double x, double y)
}
#endif
/* HAVE_COPYSIGN */
#ifndef HAVE_ROUND
double
round
(
double
x
)
{
double
absx
,
y
;
absx
=
fabs
(
x
);
y
=
floor
(
absx
);
if
(
absx
-
y
>=
0
.
5
)
y
+=
1
.
0
;
return
copysign
(
y
,
x
);
}
#endif
/* HAVE_ROUND */
#ifndef HAVE_LOG1P
#include <float.h>
...
...
configure
Dosyayı görüntüle @
8e5446f9
#! /bin/sh
# From configure.in Revision: 7
0903
.
# From configure.in Revision: 7
1009
.
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.61 for python 2.7.
#
...
...
@@ -22169,7 +22169,8 @@ fi
for ac_func in acosh asinh atanh copysign expm1 finite hypot log1p
for ac_func in acosh asinh atanh copysign expm1 finite hypot log1p round
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
{ echo "$as_me:$LINENO: checking for $ac_func" >&5
...
...
configure.in
Dosyayı görüntüle @
8e5446f9
...
...
@@ -3250,7 +3250,7 @@ then
[Define if tanh(-0.) is -0., or if platform doesn't have signed zeros])
fi
AC_CHECK_FUNCS([acosh asinh atanh copysign expm1 finite hypot log1p])
AC_CHECK_FUNCS([acosh asinh atanh copysign expm1 finite hypot log1p
round
])
AC_CHECK_DECLS([isinf, isnan, isfinite], [], [], [[#include <math.h>]])
LIBS=$LIBS_SAVE
...
...
pyconfig.h.in
Dosyayı görüntüle @
8e5446f9
...
...
@@ -504,6 +504,9 @@
/* Define if you have readline 4.0 */
#undef HAVE_RL_PRE_INPUT_HOOK
/* Define to 1 if you have the `round' function. */
#undef HAVE_ROUND
/* Define to 1 if you have the `select' function. */
#undef HAVE_SELECT
...
...
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