Skip to content

Commit

Permalink
Avoid broadcasting
Browse files Browse the repository at this point in the history
Co-authored-by: David Widmann <devmotion@users.noreply.github.com>
  • Loading branch information
dmbates and devmotion authored Apr 2, 2022
1 parent 0a711ab commit 0e0b6c0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/misc.jl
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ lstirling_asym(x::BigFloat) = loggamma(x) + x - log(x)*(x - big(0.5)) - log2π/b
lstirling_asym(x::Integer) = lstirling_asym(float(x))

const lstirlingF64 = Float64[lstirling_asym(k) for k in big(1):big(64)]
const lstirlingF32 = Float32.(view(lstirlingF64, 1:40))
const lstirlingF32 = [Float32(lstirlingF64[i]) for i in 1:40]

function lstirling_asym(x::Float64)
isinteger(x) && (0 < x length(lstirlingF64)) && return lstirlingF64[Int(x)]
Expand Down

0 comments on commit 0e0b6c0

Please sign in to comment.