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
julia>Int(Float64x4(3.0))
ERROR: MethodError: no method matching Int64(::MultiFloat{Float64, 4})
Closest candidates are:
(::Type{T})(::T) where T<:Number at boot.jl:760
(::Type{T})(::AbstractChar) where T<:Union{AbstractChar, Number} at char.jl:50
(::Type{T})(::BigInt) where T<:Union{Int128, Int16, Int32, Int64, Int8} at gmp.jl:356...
Stacktrace:
[1] top-level scope
@ REPL[37]:1
julia>Integer(Float64x4(3.0))
ERROR: MethodError: no method matching Integer(::MultiFloat{Float64, 4})
Closest candidates are:
(::Type{T})(::T) where T<:Number at boot.jl:760
(::Type{T})(::AbstractChar) where T<:Union{AbstractChar, Number} at char.jl:50
(::Type{T})(::Base.TwicePrecision) where T<:Number at twiceprecision.jl:243...
Stacktrace:
[1] top-level scope
@ REPL[38]:1
It would be nice for these to work to easily switch between Float64 and MultiFloats.
The text was updated successfully, but these errors were encountered:
Hey @jishnub! Thanks for your interest in MultiFloats.jl, and sorry I never got around to looking at this issue years ago.
I've added a conversion to Integer that goes through BigFloat in commit 7eb21d6. Is this sufficient for your purposes? It might be possible to get a faster version that doesn't go through BigFloat, but I don't really understand the use-case of conversion to Integer when it only works for a vanishingly small fraction of inputs.
If this stopgap solution is insufficient, please feel free to reopen this issue.
It would be nice for these to work to easily switch between
Float64
andMultiFloat
s.The text was updated successfully, but these errors were encountered: