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
fe13883f
Kaydet (Commit)
fe13883f
authored
Mar 19, 2019
tarafından
Raymond Hettinger
Kaydeden (comit)
Miss Islington (bot)
Mar 19, 2019
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
bpo-36324: Improved code formatting for the NormalDist.inv_cdf rational approximation (GH-12448)
https://bugs.python.org/issue36324
üst
52a594bd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
48 additions
and
46 deletions
+48
-46
statistics.py
Lib/statistics.py
+48
-46
No files found.
Lib/statistics.py
Dosyayı görüntüle @
fe13883f
...
@@ -767,60 +767,62 @@ class NormalDist:
...
@@ -767,60 +767,62 @@ class NormalDist:
q
=
p
-
0.5
q
=
p
-
0.5
if
fabs
(
q
)
<=
0.425
:
if
fabs
(
q
)
<=
0.425
:
r
=
0.180625
-
q
*
q
r
=
0.180625
-
q
*
q
num
=
(
q
*
(((((((
2.50908
_09287_30122_6727e
+
3
*
r
+
num
=
(((((((
2.50908
_09287_30122_6727e
+
3
*
r
+
3.34305
_75583_58812_8105e
+
4
)
*
r
+
3.34305
_75583_58812_8105e
+
4
)
*
r
+
6.72657
_70927_00870_0853e
+
4
)
*
r
+
6.72657
_70927_00870_0853e
+
4
)
*
r
+
4.59219
_53931_54987_1457e
+
4
)
*
r
+
4.59219
_53931_54987_1457e
+
4
)
*
r
+
1.37316
_93765_50946_1125e
+
4
)
*
r
+
1.37316
_93765_50946_1125e
+
4
)
*
r
+
1.97159
_09503_06551_4427e
+
3
)
*
r
+
1.97159
_09503_06551_4427e
+
3
)
*
r
+
1.33141
_66789_17843_7745e
+
2
)
*
r
+
1.33141
_66789_17843_7745e
+
2
)
*
r
+
3.38713
_28727_96366_6080e
+
0
))
3.38713
_28727_96366_6080e
+
0
)
*
q
den
=
((((((((
5.22649
_52788_52854_5610e
+
3
*
r
+
den
=
(((((((
5.22649
_52788_52854_5610e
+
3
*
r
+
2.87290
_85735_72194_2674e
+
4
)
*
r
+
2.87290
_85735_72194_2674e
+
4
)
*
r
+
3.93078
_95800_09271_0610e
+
4
)
*
r
+
3.93078
_95800_09271_0610e
+
4
)
*
r
+
2.12137
_94301_58659_5867e
+
4
)
*
r
+
2.12137
_94301_58659_5867e
+
4
)
*
r
+
5.39419
_60214_24751_1077e
+
3
)
*
r
+
5.39419
_60214_24751_1077e
+
3
)
*
r
+
6.87187
_00749_20579_0830e
+
2
)
*
r
+
6.87187
_00749_20579_0830e
+
2
)
*
r
+
4.23133
_30701_60091_1252e
+
1
)
*
r
+
1.0
))
4.23133
_30701_60091_1252e
+
1
)
*
r
+
1.0
)
x
=
num
/
den
x
=
num
/
den
return
self
.
mu
+
(
x
*
self
.
sigma
)
return
self
.
mu
+
(
x
*
self
.
sigma
)
r
=
p
if
q
<=
0.0
else
1.0
-
p
r
=
p
if
q
<=
0.0
else
1.0
-
p
r
=
sqrt
(
-
log
(
r
))
r
=
sqrt
(
-
log
(
r
))
if
r
<=
5.0
:
if
r
<=
5.0
:
r
=
r
-
1.6
r
=
r
-
1.6
num
=
(((((((
(
7.74545
_01427_83414_07640e
-
4
*
r
+
num
=
(((((((
7.74545
_01427_83414_07640e
-
4
*
r
+
2.27238
_44989_26918_45833e
-
2
)
*
r
+
2.27238
_44989_26918_45833e
-
2
)
*
r
+
2.41780
_72517_74506_11770e
-
1
)
*
r
+
2.41780
_72517_74506_11770e
-
1
)
*
r
+
1.27045
_82524_52368_38258e
+
0
)
*
r
+
1.27045
_82524_52368_38258e
+
0
)
*
r
+
3.64784
_83247_63204_60504e
+
0
)
*
r
+
3.64784
_83247_63204_60504e
+
0
)
*
r
+
5.76949
_72214_60691_40550e
+
0
)
*
r
+
5.76949
_72214_60691_40550e
+
0
)
*
r
+
4.63033
_78461_56545_29590e
+
0
)
*
r
+
4.63033
_78461_56545_29590e
+
0
)
*
r
+
1.42343
_71107_49683_57734e
+
0
)
)
1.42343
_71107_49683_57734e
+
0
)
den
=
(((((((
1.05075
_00716_44416_84324e
-
9
*
r
+
den
=
((((((((
1.05075
_00716_44416_84324e
-
9
*
r
+
5.47593
_80849_95344_94600e
-
4
)
*
r
+
5.47593
_80849_95344_94600e
-
4
)
*
r
+
1.51986
_66563_61645_71966e
-
2
)
*
r
+
1.51986
_66563_61645_71966e
-
2
)
*
r
+
1.48103
_97642_74800_74590e
-
1
)
*
r
+
1.48103
_97642_74800_7459
0e
-
1
)
*
r
+
6.89767
_33498_51000_0455
0e
-
1
)
*
r
+
6.89767
_33498_51000_04550e
-
1
)
*
r
+
1.67638
_48301_83803_84940e
+
0
)
*
r
+
1.67638
_48301_83803_84940
e
+
0
)
*
r
+
2.05319
_16266_37758_82187
e
+
0
)
*
r
+
2.05319
_16266_37758_82187e
+
0
)
*
r
+
1.0
)
)
1.0
)
else
:
else
:
r
=
r
-
5.0
r
=
r
-
5.0
num
=
((((((((
2.01033
_43992_92288_13265e
-
7
*
r
+
num
=
(((((((
2.01033
_43992_92288_13265e
-
7
*
r
+
2.71155
_55687_43487_57815e
-
5
)
*
r
+
2.71155
_55687_43487_57815e
-
5
)
*
r
+
1.24266
_09473_88078_43860e
-
3
)
*
r
+
1.24266
_09473_88078_43860e
-
3
)
*
r
+
2.65321
_89526_57612_30930e
-
2
)
*
r
+
2.65321
_89526_57612_30930e
-
2
)
*
r
+
2.96560
_57182_85048_91230e
-
1
)
*
r
+
2.96560
_57182_85048_91230e
-
1
)
*
r
+
1.78482
_65399_17291_33580e
+
0
)
*
r
+
1.78482
_65399_17291_33580e
+
0
)
*
r
+
5.46378
_49111_64114_36990e
+
0
)
*
r
+
5.46378
_49111_64114_36990e
+
0
)
*
r
+
6.65790
_46435_01103_77720e
+
0
))
6.65790
_46435_01103_77720e
+
0
)
den
=
((((((((
2.04426
_31033_89939_78564e
-
15
*
r
+
den
=
(((((((
2.04426
_31033_89939_78564e
-
15
*
r
+
1.42151
_17583_16445_88870e
-
7
)
*
r
+
1.42151
_17583_16445_88870e
-
7
)
*
r
+
1.84631
_83175_10054_68180e
-
5
)
*
r
+
1.84631
_83175_10054_68180e
-
5
)
*
r
+
7.86869
_13114_56132_59100e
-
4
)
*
r
+
7.86869
_13114_56132_59100e
-
4
)
*
r
+
1.48753
_61290_85061_48525e
-
2
)
*
r
+
1.48753
_61290_85061_48525e
-
2
)
*
r
+
1.36929
_88092_27358_05310e
-
1
)
*
r
+
1.36929
_88092_27358_05310e
-
1
)
*
r
+
5.99832
_20655_58879_37690e
-
1
)
*
r
+
1.0
))
5.99832
_20655_58879_37690e
-
1
)
*
r
+
1.0
)
x
=
num
/
den
x
=
num
/
den
if
q
<
0.0
:
if
q
<
0.0
:
x
=
-
x
x
=
-
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