Skip to content

Commit

Permalink
Implement isinteger and fix isnan for ExactReal
Browse files Browse the repository at this point in the history
  • Loading branch information
OlivierHnt committed Jun 17, 2024
1 parent 5d7dea2 commit 5b3d244
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/intervals/exact_literals.jl
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ Base.one(::Complex{ExactReal{T}}) where {T<:Real} = one(Complex{ExactReal{T}})
Base.hash(x::ExactReal, h::UInt) = hash(x.value, h)

Base.isfinite(x::ExactReal) = isfinite(x.value)
Base.isinteger(x::ExactReal) = isinteger(x.value)
Base.isnan(x::ExactReal) = isnan(x.value) # also ensures that `Base.isinf` works properly

# conversion and promotion

Expand Down

0 comments on commit 5b3d244

Please sign in to comment.