Skip to content

Add typemin in math.jl - #208

Merged
giordano merged 4 commits into
JuliaPhysics:mainfrom
mangelmauriz:patch-1
Sep 22, 2026
Merged

giordano merged 4 commits into
JuliaPhysics:mainfrom
mangelmauriz:patch-1

Conversation

@mangelmauriz

Copy link
Copy Markdown
Contributor

Currently, calling typemin with a Measurement as an argument throws an error. This appears to be an oversight, since typemax and floatmin are already defined for Measurement.

Measurements.jl/src/math.jl

Lines 728 to 731 in a70d82c

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)

Defining typemin also allows Measurement values to be used with AlgebraOfGraphics.jl.

@mangelmauriz mangelmauriz changed the title Adds typemin in math.jl Add typemin in math.jl Sep 19, 2026
@giordano

Copy link
Copy Markdown
Member

Thanks! Can you rebase on main and add a test?

@codecov

codecov Bot commented Sep 20, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.67%. Comparing base (c58cbe2) to head (31dcfcd).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #208   +/-   ##
=======================================
  Coverage   95.67%   95.67%           
=======================================
  Files          15       15           
  Lines         786      787    +1     
=======================================
+ Hits          752      753    +1     
  Misses         34       34           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@mangelmauriz

Copy link
Copy Markdown
Contributor Author

Thanks! Can you rebase on main and add a test?

Hi @giordano, I believe I’ve rebased my branch onto main and added the requested test. But the [Unit tests / Julia 1 - ubuntu-latest - default (pull_request)] is failing for some reason.

@giordano

Copy link
Copy Markdown
Member

Yeah, that's unrelated to your change, I'm looking into it

@mangelmauriz
mangelmauriz marked this pull request as draft September 21, 2026 11:59
@mangelmauriz
mangelmauriz marked this pull request as ready for review September 21, 2026 11:59
@mangelmauriz

Copy link
Copy Markdown
Contributor Author

Hi @giordano , I think it's ready to merge.

@giordano
giordano merged commit 59b4bc3 into JuliaPhysics:main Sep 22, 2026
13 checks passed
@mangelmauriz
mangelmauriz deleted the patch-1 branch September 22, 2026 16:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants