Skip to content

Commit 24de004

Browse files
authored
Replace depricated lfact(x) (#1857)
1 parent f852803 commit 24de004

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/univariate/continuous/ksdist.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ function cdf(d::KSDist,x::Float64)
2828
return 0.0
2929
elseif b <= 1
3030
# accuracy could be improved
31-
return exp(lfact(n)+n*(log(2*b-1)-log(n)))
31+
return exp(logfactorial(n)+n*(log(2*b-1)-log(n)))
3232
elseif x >= 1
3333
return 1.0
3434
elseif b >= n-1
@@ -56,7 +56,7 @@ function ccdf(d::KSDist,x::Float64)
5656
if b <= 0.5
5757
return 1.0
5858
elseif b <= 1
59-
return 1-exp(lfact(n)+n*(log(2*b-1)-log(n)))
59+
return 1-exp(logfactorial(n)+n*(log(2*b-1)-log(n)))
6060
elseif x >= 1
6161
return 0.0
6262
elseif b >= n-1

0 commit comments

Comments
 (0)