Skip to content

Commit 219b1f9

Browse files
authored
gh-132893: Minor edits to the statistics module PR (gh-133106)
1 parent 219d8d2 commit 219b1f9

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

Lib/statistics.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -810,8 +810,7 @@ def deco(builder):
810810
@register('normal', 'gauss')
811811
def normal_kernel():
812812
sqrt2pi = sqrt(2 * pi)
813-
sqrt2 = sqrt(2)
814-
neg_sqrt2 = -sqrt2
813+
neg_sqrt2 = -sqrt(2)
815814
pdf = lambda t: exp(-1/2 * t * t) / sqrt2pi
816815
cdf = lambda t: 1/2 * erfc(t / neg_sqrt2)
817816
invcdf = lambda t: _normal_dist_inv_cdf(t, 0.0, 1.0)
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Improved the accuracy of ``statistics.NormalDist.cdf`` for negative inputs.
1+
Improved :meth:`statistics.NormalDist.cdf` accuracy for inputs smaller than the mean.

0 commit comments

Comments
 (0)