You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
One workaround is to cast the first argument to Int32, i.e. change J(n+q, x) to J(Int32(n+q), x).
When summing products of only two Bessels, the problem does not appear.
BTW, besselj from Bessels.jl does not suffer from this issue 😀
The text was updated successfully, but these errors were encountered:
Consider summing a product of three
besselj(n, x)
s when the type ofn
isInt64
(the defaultInt
on a 64-bit machine) and type ofx
isFloat32
:This code allocates:
The type of the final result is inferred as
Union{Float32, Float64}
instead ofFloat32
:One workaround is to cast the first argument to
Int32
, i.e. changeJ(n+q, x)
toJ(Int32(n+q), x)
.When summing products of only two Bessels, the problem does not appear.
BTW,
besselj
from Bessels.jl does not suffer from this issue 😀The text was updated successfully, but these errors were encountered: