https://github.com/python/cpython/commit/219b1f9d1d97e271213fe324b94ed544e890630b commit: 219b1f9d1d97e271213fe324b94ed544e890630b branch: main author: Raymond Hettinger <rhettin...@users.noreply.github.com> committer: rhettinger <rhettin...@users.noreply.github.com> date: 2025-04-28T23:05:37-05:00 summary:
gh-132893: Minor edits to the statistics module PR (gh-133106) files: M Lib/statistics.py M Misc/NEWS.d/next/Library/2025-04-24-21-22-46.gh-issue-132893.KFuxZ2.rst diff --git a/Lib/statistics.py b/Lib/statistics.py index 9dcb20d2a485eb..3d805cb073987d 100644 --- a/Lib/statistics.py +++ b/Lib/statistics.py @@ -810,8 +810,7 @@ def deco(builder): @register('normal', 'gauss') def normal_kernel(): sqrt2pi = sqrt(2 * pi) - sqrt2 = sqrt(2) - neg_sqrt2 = -sqrt2 + neg_sqrt2 = -sqrt(2) pdf = lambda t: exp(-1/2 * t * t) / sqrt2pi cdf = lambda t: 1/2 * erfc(t / neg_sqrt2) invcdf = lambda t: _normal_dist_inv_cdf(t, 0.0, 1.0) diff --git a/Misc/NEWS.d/next/Library/2025-04-24-21-22-46.gh-issue-132893.KFuxZ2.rst b/Misc/NEWS.d/next/Library/2025-04-24-21-22-46.gh-issue-132893.KFuxZ2.rst index 1ef651188e04bc..1f5a48982635c0 100644 --- a/Misc/NEWS.d/next/Library/2025-04-24-21-22-46.gh-issue-132893.KFuxZ2.rst +++ b/Misc/NEWS.d/next/Library/2025-04-24-21-22-46.gh-issue-132893.KFuxZ2.rst @@ -1 +1 @@ -Improved the accuracy of ``statistics.NormalDist.cdf`` for negative inputs. +Improved :meth:`statistics.NormalDist.cdf` accuracy for inputs smaller than the mean. _______________________________________________ Python-checkins mailing list -- python-checkins@python.org To unsubscribe send an email to python-checkins-le...@python.org https://mail.python.org/mailman3/lists/python-checkins.python.org/ Member address: arch...@mail-archive.com