Skip to content

Commit cc8c06d

Browse files
committed
Use float literals in comparisons in some methods restricted to
Float64 arguments.
1 parent e41adcf commit cc8c06d

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

src/beta_inc.jl

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ for a0, b0 >= 8
5252
function stirling_corr(a0::Float64, b0::Float64)
5353
a = min(a0, b0)
5454
b = max(a0, b0)
55-
@assert a >= 8
55+
@assert a >= 8.0
5656

5757
h = a/b
5858
c = h/(1.0 + h)
@@ -190,8 +190,8 @@ See also: [`beta_inc`](@ref)
190190
`BFRAC(A,B,X,Y,LAMBDA,EPS)` from Didonato and Morris (1982)
191191
"""
192192
function beta_inc_cont_fraction(a::Float64, b::Float64, x::Float64, y::Float64, lambda::Float64, epps::Float64)
193-
@assert a > 1
194-
@assert b > 1
193+
@assert a > 1.0
194+
@assert b > 1.0
195195
ans = beta_integrand(a,b,x,y)
196196
if ans == 0.0
197197
return 0.0
@@ -258,8 +258,8 @@ See also: [`beta_inc`](@ref)
258258
`BASYM(A,B,LAMBDA,EPS)` from Didonato and Morris (1982)
259259
"""
260260
function beta_inc_asymptotic_symmetric(a::Float64, b::Float64, lambda::Float64, epps::Float64)
261-
@assert a >= 15
262-
@assert b >= 15
261+
@assert a >= 15.0
262+
@assert b >= 15.0
263263
a0 =zeros(22)
264264
b0 = zeros(22)
265265
c = zeros(22)
@@ -356,8 +356,8 @@ External links: [DLMF](https://dlmf.nist.gov/8.17.22), [Wikipedia](https://en.wi
356356
See also: [`beta_inc`](@ref)
357357
"""
358358
function beta_inc_asymptotic_asymmetric(a::Float64, b::Float64, x::Float64, y::Float64, w::Float64, epps::Float64)
359-
@assert a >= 15
360-
@assert b <= 1
359+
@assert a >= 15.0
360+
@assert b <= 1.0
361361
c = zeros(31)
362362
d = zeros(31)
363363
bm1 = b - 1.0
@@ -521,7 +521,7 @@ See also: [`beta_inc`](@ref)
521521
`BPSER(A,B,X,EPS)` from Didonato and Morris (1982)
522522
"""
523523
function beta_inc_power_series(a::Float64, b::Float64, x::Float64, epps::Float64)
524-
@assert b <= 1 || b*x <= 0.7
524+
@assert b <= 1.0 || b*x <= 0.7
525525
ans = 0.0
526526
if x == 0.0
527527
return 0.0
@@ -691,7 +691,7 @@ function beta_inc_diff(a::Float64, b::Float64, x::Float64, y::Float64, n::Intege
691691
end
692692

693693
kp1 = k + 1
694-
for i = kp1:nm1
694+
for i in kp1:nm1
695695
l = i - 1
696696
d *= ((apb + l)/(ap1 + l))*x
697697
w += d

0 commit comments

Comments
 (0)