Skip to content

Commit a09e3c4

Browse files
committed
Return a Decimal zero when the numerator is zero
1 parent 3911581 commit a09e3c4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Lib/statistics.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ def _decimal_sqrt_of_frac(n: int, m: int) -> Decimal:
336336
# Method: Check the result, moving up or down a step if needed.
337337
if n <= 0:
338338
if not n:
339-
return 0.0
339+
return Decimal('0.0')
340340
n, m = -n, -m
341341

342342
root = (Decimal(n) / Decimal(m)).sqrt()

0 commit comments

Comments
 (0)