Skip to content

Commit d8a7e7a

Browse files
committed
Move parentheses
1 parent c1ab292 commit d8a7e7a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/univariate/continuous/inversegaussian.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ function cdf(d::InverseGaussian, x::Real)
102102
# 2λ/μ and normlogcdf(-u*(v+1)) are similar magnitude, opp. sign
103103
# truncating to [0, 1] as an additional precaution
104104
# Ref https://github.com/JuliaStats/Distributions.jl/issues/1873
105-
z = clamp(normcdf(u * (v - 1)) + exp(2λ / μ + normlogcdf(-u * (v + 1)), 0, 1))
105+
z = clamp(normcdf(u * (v - 1)) + exp(2λ / μ + normlogcdf(-u * (v + 1))), 0, 1)
106106

107107
# otherwise `NaN` is returned for `+Inf`
108108
return isinf(x) && x > 0 ? one(z) : z
@@ -116,7 +116,7 @@ function ccdf(d::InverseGaussian, x::Real)
116116
# 2λ/μ and normlogcdf(-u*(v+1)) are similar magnitude, opp. sign
117117
# truncating to [0, 1] as an additional precaution
118118
# Ref https://github.com/JuliaStats/Distributions.jl/issues/1873
119-
z = clamp(normccdf(u * (v - 1)) - exp(2λ / μ + normlogcdf(-u * (v + 1)), 0, 1))
119+
z = clamp(normccdf(u * (v - 1)) - exp(2λ / μ + normlogcdf(-u * (v + 1))), 0, 1)
120120

121121
# otherwise `NaN` is returned for `+Inf`
122122
return isinf(x) && x > 0 ? zero(z) : z

0 commit comments

Comments
 (0)