Skip to content

Commit d2bda7b

Browse files
committed
No need to spell out PI
1 parent fe750f4 commit d2bda7b

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

bench_runner/hpt.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,6 @@ def cdfnorm(x: float) -> float:
115115
a3 = 1.781477937
116116
a4 = -1.821255978
117117
a5 = 1.330274429
118-
pi = 3.141592653589793238462643
119118

120119
L = x
121120

@@ -124,7 +123,7 @@ def cdfnorm(x: float) -> float:
124123

125124
K = 1.0 / (1.0 + 0.2316419 * L)
126125
tmp = ((((a5 * K + a4) * K + a3) * K + a2) * K + a1) * K
127-
tmp = np.exp(0.0 - L * L / 2.0) * tmp / np.sqrt(2.0 * pi)
126+
tmp = np.exp(0.0 - L * L / 2.0) * tmp / np.sqrt(2.0 * np.pi)
128127

129128
if x > 0.0:
130129
tmp = 1.0 - tmp

0 commit comments

Comments
 (0)