Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f05eddb

Browse files
committed
Floats everywhere
1 parent 96a5f14 commit f05eddb

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

Lib/statistics.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1723,8 +1723,8 @@ def f_inv(y):
17231723
return f_inv
17241724

17251725
def _quartic_invcdf_estimate(p):
1726-
sign, p = (1, p) if p <= 1/2 else (-1, 1 - p)
1727-
x = (2 * p) ** 0.4258865685331 - 1 # (204/479)
1726+
sign, p = (1.0, p) if p <= 1/2 else (-1.0, 1.0 - p)
1727+
x = (2.0 * p) ** 0.4258865685331 - 1.0
17281728
if p >= 0.004:
17291729
x += 0.026818732 * sin(7.101753784 * p + 2.732305658)
17301730
return x * sign
@@ -1735,8 +1735,8 @@ def _quartic_invcdf_estimate(p):
17351735
f_prime = lambda t: 15/16 * (1.0 - t * t) ** 2)
17361736

17371737
def _triweight_invcdf_estimate(p):
1738-
sign, p = (1, p) if p <= 1/2 else (-1, 1 - p)
1739-
x = (2 * p) ** 0.3400218741872791 - 1 # (17/50)
1738+
sign, p = (1.0, p) if p <= 1/2 else (-1.0, 1.0 - p)
1739+
x = (2.0 * p) ** 0.3400218741872791 - 1.0
17401740
return x * sign
17411741

17421742
_triweight_invcdf = _newton_raphson(

0 commit comments

Comments
 (0)