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
865c17fb
Unverified
Kaydet (Commit)
865c17fb
authored
Eyl 12, 2018
tarafından
Benjamin Peterson
Kaydeden (comit)
GitHub
Eyl 12, 2018
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
closes bpo-34640: Remove the TANH_PRESERVES_ZERO_SIGN configure check. (GH-9206)
üst
7f0d59f3
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
0 additions
and
81 deletions
+0
-81
test_cmath.py
Lib/test/test_cmath.py
+0
-2
test_math.py
Lib/test/test_math.py
+0
-2
configure
configure
+0
-47
configure.ac
configure.ac
+0
-27
pyconfig.h.in
pyconfig.h.in
+0
-3
No files found.
Lib/test/test_cmath.py
Dosyayı görüntüle @
865c17fb
...
@@ -577,8 +577,6 @@ class CMathTests(unittest.TestCase):
...
@@ -577,8 +577,6 @@ class CMathTests(unittest.TestCase):
self
.
assertTrue
(
cmath
.
isinf
(
complex
(
INF
,
NAN
)))
self
.
assertTrue
(
cmath
.
isinf
(
complex
(
INF
,
NAN
)))
@requires_IEEE_754
@requires_IEEE_754
@unittest.skipIf
(
sysconfig
.
get_config_var
(
'TANH_PRESERVES_ZERO_SIGN'
)
==
0
,
"system tanh() function doesn't copy the sign"
)
def
testTanhSign
(
self
):
def
testTanhSign
(
self
):
for
z
in
complex_zeros
:
for
z
in
complex_zeros
:
self
.
assertComplexIdentical
(
cmath
.
tanh
(
z
),
z
)
self
.
assertComplexIdentical
(
cmath
.
tanh
(
z
),
z
)
...
...
Lib/test/test_math.py
Dosyayı görüntüle @
865c17fb
...
@@ -1355,8 +1355,6 @@ class MathTests(unittest.TestCase):
...
@@ -1355,8 +1355,6 @@ class MathTests(unittest.TestCase):
self
.
assertTrue
(
math
.
isnan
(
math
.
tanh
(
NAN
)))
self
.
assertTrue
(
math
.
isnan
(
math
.
tanh
(
NAN
)))
@requires_IEEE_754
@requires_IEEE_754
@unittest.skipIf
(
sysconfig
.
get_config_var
(
'TANH_PRESERVES_ZERO_SIGN'
)
==
0
,
"system tanh() function doesn't copy the sign"
)
def
testTanhSign
(
self
):
def
testTanhSign
(
self
):
# check that tanh(-0.) == -0. on IEEE 754 systems
# check that tanh(-0.) == -0. on IEEE 754 systems
self
.
assertEqual
(
math
.
tanh
(
-
0.
),
-
0.
)
self
.
assertEqual
(
math
.
tanh
(
-
0.
),
-
0.
)
...
...
configure
Dosyayı görüntüle @
865c17fb
...
@@ -14163,53 +14163,6 @@ cat >>confdefs.h <<_ACEOF
...
@@ -14163,53 +14163,6 @@ cat >>confdefs.h <<_ACEOF
_ACEOF
_ACEOF
# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
# -0. on some architectures.
{
$as_echo
"
$as_me
:
${
as_lineno
-
$LINENO
}
: checking whether tanh preserves the sign of zero"
>
&5
$as_echo_n
"checking whether tanh preserves the sign of zero... "
>
&6
;
}
if
${
ac_cv_tanh_preserves_zero_sign
+
:
}
false
;
then
:
$as_echo_n
"(cached) "
>
&6
else
if
test
"
$cross_compiling
"
=
yes
;
then
:
ac_cv_tanh_preserves_zero_sign
=
no
else
cat
confdefs.h -
<<
_ACEOF
>conftest.
$ac_ext
/* end confdefs.h. */
#include <math.h>
#include <stdlib.h>
int main() {
/* return 0 if either negative zeros don't exist
on this platform or if negative zeros exist
and tanh(-0.) == -0. */
if (atan2(0., -1.) == atan2(-0., -1.) ||
atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
else exit(1);
}
_ACEOF
if
ac_fn_c_try_run
"
$LINENO
"
;
then
:
ac_cv_tanh_preserves_zero_sign
=
yes
else
ac_cv_tanh_preserves_zero_sign
=
no
fi
rm
-f
core
*
.core core.conftest.
*
gmon.out bb.out conftest
$ac_exeext
\
conftest.
$ac_objext
conftest.beam conftest.
$ac_ext
fi
fi
{
$as_echo
"
$as_me
:
${
as_lineno
-
$LINENO
}
: result:
$ac_cv_tanh_preserves_zero_sign
"
>
&5
$as_echo
"
$ac_cv_tanh_preserves_zero_sign
"
>
&6
;
}
if
test
"
$ac_cv_tanh_preserves_zero_sign
"
=
yes
then
$as_echo
"#define TANH_PRESERVES_ZERO_SIGN 1"
>>
confdefs.h
fi
LIBS
=
$LIBS_SAVE
# For multiprocessing module, check that sem_open
# For multiprocessing module, check that sem_open
# actually works. For FreeBSD versions <= 7.2,
# actually works. For FreeBSD versions <= 7.2,
# the kernel module that provides POSIX semaphores
# the kernel module that provides POSIX semaphores
...
...
configure.ac
Dosyayı görüntüle @
865c17fb
...
@@ -4359,33 +4359,6 @@ AC_CHECK_FUNCS([acosh asinh atanh copysign erf erfc expm1 finite gamma])
...
@@ -4359,33 +4359,6 @@ AC_CHECK_FUNCS([acosh asinh atanh copysign erf erfc expm1 finite gamma])
AC_CHECK_FUNCS([hypot lgamma log1p log2 round tgamma])
AC_CHECK_FUNCS([hypot lgamma log1p log2 round tgamma])
AC_CHECK_DECLS([isinf, isnan, isfinite], [], [], [[#include <math.h>]])
AC_CHECK_DECLS([isinf, isnan, isfinite], [], [], [[#include <math.h>]])
# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
# -0. on some architectures.
AC_MSG_CHECKING(whether tanh preserves the sign of zero)
AC_CACHE_VAL(ac_cv_tanh_preserves_zero_sign, [
AC_RUN_IFELSE([AC_LANG_SOURCE([[
#include <math.h>
#include <stdlib.h>
int main() {
/* return 0 if either negative zeros don't exist
on this platform or if negative zeros exist
and tanh(-0.) == -0. */
if (atan2(0., -1.) == atan2(-0., -1.) ||
atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
else exit(1);
}
]])],
[ac_cv_tanh_preserves_zero_sign=yes],
[ac_cv_tanh_preserves_zero_sign=no],
[ac_cv_tanh_preserves_zero_sign=no])])
AC_MSG_RESULT($ac_cv_tanh_preserves_zero_sign)
if test "$ac_cv_tanh_preserves_zero_sign" = yes
then
AC_DEFINE(TANH_PRESERVES_ZERO_SIGN, 1,
[Define if tanh(-0.) is -0., or if platform doesn't have signed zeros])
fi
LIBS=$LIBS_SAVE
# For multiprocessing module, check that sem_open
# For multiprocessing module, check that sem_open
# actually works. For FreeBSD versions <= 7.2,
# actually works. For FreeBSD versions <= 7.2,
# the kernel module that provides POSIX semaphores
# the kernel module that provides POSIX semaphores
...
...
pyconfig.h.in
Dosyayı görüntüle @
865c17fb
...
@@ -1419,9 +1419,6 @@
...
@@ -1419,9 +1419,6 @@
(which you can't on SCO ODT 3.0). */
(which you can't on SCO ODT 3.0). */
#undef SYS_SELECT_WITH_SYS_TIME
#undef SYS_SELECT_WITH_SYS_TIME
/* Define if tanh(-0.) is -0., or if platform doesn't have signed zeros */
#undef TANH_PRESERVES_ZERO_SIGN
/* Library needed by timemodule.c: librt may be needed for clock_gettime() */
/* Library needed by timemodule.c: librt may be needed for clock_gettime() */
#undef TIMEMODULE_LIB
#undef TIMEMODULE_LIB
...
...
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