Skip to content

Commit

Permalink
Fix #588
Browse files Browse the repository at this point in the history
  • Loading branch information
OlivierHnt authored Oct 11, 2023
1 parent 9ac59c7 commit c6bb6d7
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions src/IntervalArithmetic.jl
Original file line number Diff line number Diff line change
Expand Up @@ -117,15 +117,4 @@ include("plot_recipes/plot_recipes.jl")
"""
const Region{T} = Union{Interval{T}, IntervalBox{T}}


# These definitions has been put there because generated functions must be
# defined after all methods they use.
@generated function Interval{T}(x::AbstractIrrational) where T
res = atomic(Interval{T}, x()) # Precompute the interval
return :(return $res) # Set body of the function to return the precomputed result
end

Interval{BigFloat}(x::AbstractIrrational) = atomic(Interval{BigFloat}, x)
Interval(x::AbstractIrrational) = Interval{Float64}(x)

end # module IntervalArithmetic

0 comments on commit c6bb6d7

Please sign in to comment.