Skip to content

Commit

Permalink
FIX type arguments to rationalize() on atomic() due to #410
Browse files Browse the repository at this point in the history
  • Loading branch information
cnaak committed Sep 4, 2020
1 parent d3a318c commit 2b97baa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/intervals/conversion.jl
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ end
function atomic(::Type{Interval{T}}, x::S) where {T<:AbstractFloat, S<:AbstractFloat}
isinf(x) && return wideinterval(T(x))

xrat = rationalize(x)
xrat = T == BigFloat ? rationalize(BigInt, x) : rationalize(x) # Issue #410

# This prevents that xrat returns a 0//1 when x is very small
# or 1//0 when x is too large but finite
Expand Down

0 comments on commit 2b97baa

Please sign in to comment.