Hi! I was trying to use Elliptic.jl in order to evaluate K(k) to high accuracy using BigFloats, but noticed that if given a BigFloat as an input, Elliptic.K returns a Float64:
julia> using Elliptic
julia> Elliptic.K(big"0.512341234")
1.8646739600308775
@oxinabox explained to me that, by construction, Elliptic.jl functions explicitly cast all Reals down to Float64, and was wondering if the code may be adapted for other types such as BigFloat, perhaps adapting the constants such as D1MACH1 with something like const D1MACH1 = realmin(T) with T<:AbstractFloat, etc., for these types?
Hi! I was trying to use Elliptic.jl in order to evaluate K(k) to high accuracy using BigFloats, but noticed that if given a BigFloat as an input,
Elliptic.K
returns aFloat64
:@oxinabox explained to me that, by construction, Elliptic.jl functions explicitly cast all Reals down to Float64, and was wondering if the code may be adapted for other types such as
BigFloat
, perhaps adapting the constants such asD1MACH1
with something likeconst D1MACH1 = realmin(T)
withT<:AbstractFloat
, etc., for these types?