Skip to content

Commit

Permalink
Merge 5fb8b21 into 277b52f
Browse files Browse the repository at this point in the history
  • Loading branch information
stillyslalom committed May 21, 2020
2 parents 277b52f + 5fb8b21 commit 28863e2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/math.jl
Original file line number Diff line number Diff line change
Expand Up @@ -715,6 +715,9 @@ Base.nextfloat(a::Measurement, n::Integer) = result(nextfloat(a.val, n), 1, a)

Base.maxintfloat(::Type{Measurement{T}}) where {T<:AbstractFloat} = maxintfloat(T)

Base.floatmin(::Type{Measurement{T}}) where {T<:AbstractFloat} = floatmin(T) ± zero(T)
Base.floatmax(::Type{Measurement{T}}) where {T<:AbstractFloat} = floatmax(T) ± zero(T)

Base.typemax(::Type{Measurement{T}}) where {T<:AbstractFloat} = typemax(T)

### Rounding
Expand Down
2 changes: 2 additions & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -540,6 +540,8 @@ end
@test nextfloat(x, 3) nextfloat(x.val, 3) ± x.err
@test prevfloat(w) prevfloat(w.val) ± w.err
@test prevfloat(y, 3) prevfloat(y.val, 3) ± y.err
@test floatmin(Measurement{Float64}) floatmin(Float64)
@test floatmax(Measurement{Float64}) floatmax(Float64)
@test maxintfloat(Measurement{Float64}) maxintfloat(Float64)
end

Expand Down

0 comments on commit 28863e2

Please sign in to comment.