diff --git a/Lib/random.py b/Lib/random.py index e1c2c2bbcbe066..01c0c3d25fb519 100644 --- a/Lib/random.py +++ b/Lib/random.py @@ -388,7 +388,7 @@ def triangular(self, low=0.0, high=1.0, mode=None): u = 1.0 - u c = 1.0 - c low, high = high, low - return low + (high - low) * (u * c) ** 0.5 + return low + (high - low) * _sqrt(u * c) ## -------------------- normal distribution --------------------