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
6f493b7b
Kaydet (Commit)
6f493b7b
authored
Tem 06, 2010
tarafından
Mark Dickinson
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Indentation and PEP 7 fixes.
üst
d885e95b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
20 deletions
+23
-20
_math.c
Modules/_math.c
+23
-20
No files found.
Modules/_math.c
Dosyayı görüntüle @
6f493b7b
...
@@ -55,7 +55,8 @@ _Py_acosh(double x)
...
@@ -55,7 +55,8 @@ _Py_acosh(double x)
else
if
(
x
>=
two_pow_p28
)
{
/* x > 2**28 */
else
if
(
x
>=
two_pow_p28
)
{
/* x > 2**28 */
if
(
Py_IS_INFINITY
(
x
))
{
if
(
Py_IS_INFINITY
(
x
))
{
return
x
+
x
;
return
x
+
x
;
}
else
{
}
else
{
return
log
(
x
)
+
ln2
;
/* acosh(huge)=log(2x) */
return
log
(
x
)
+
ln2
;
/* acosh(huge)=log(2x) */
}
}
}
}
...
@@ -173,15 +174,15 @@ _Py_expm1(double x)
...
@@ -173,15 +174,15 @@ _Py_expm1(double x)
*/
*/
if
(
fabs
(
x
)
<
0
.
7
)
{
if
(
fabs
(
x
)
<
0
.
7
)
{
double
u
;
double
u
;
u
=
exp
(
x
);
u
=
exp
(
x
);
if
(
u
==
1
.
0
)
if
(
u
==
1
.
0
)
return
x
;
return
x
;
else
else
return
(
u
-
1
.
0
)
*
x
/
log
(
u
);
return
(
u
-
1
.
0
)
*
x
/
log
(
u
);
}
}
else
else
return
exp
(
x
)
-
1
.
0
;
return
exp
(
x
)
-
1
.
0
;
}
}
/* log1p(x) = log(1+x). The log1p function is designed to avoid the
/* log1p(x) = log(1+x). The log1p function is designed to avoid the
...
@@ -213,17 +214,19 @@ _Py_log1p(double x)
...
@@ -213,17 +214,19 @@ _Py_log1p(double x)
double
y
;
double
y
;
if
(
fabs
(
x
)
<
DBL_EPSILON
/
2
.)
{
if
(
fabs
(
x
)
<
DBL_EPSILON
/
2
.)
{
return
x
;
return
x
;
}
else
if
(
-
0
.
5
<=
x
&&
x
<=
1
.)
{
}
/* WARNING: it's possible than an overeager compiler
else
if
(
-
0
.
5
<=
x
&&
x
<=
1
.)
{
will incorrectly optimize the following two lines
/* WARNING: it's possible than an overeager compiler
to the equivalent of "return log(1.+x)". If this
will incorrectly optimize the following two lines
happens, then results from log1p will be inaccurate
to the equivalent of "return log(1.+x)". If this
for small x. */
happens, then results from log1p will be inaccurate
y
=
1
.
+
x
;
for small x. */
return
log
(
y
)
-
((
y
-
1
.)
-
x
)
/
y
;
y
=
1
.
+
x
;
}
else
{
return
log
(
y
)
-
((
y
-
1
.)
-
x
)
/
y
;
/* NaNs and infinities should end up here */
}
return
log
(
1
.
+
x
);
else
{
/* NaNs and infinities should end up here */
return
log
(
1
.
+
x
);
}
}
}
}
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