Skip to content

Conversation

@sostock
Copy link
Collaborator

@sostock sostock commented Dec 28, 2025

This implements a hash method so that quantities that have equal values and equal units have the same hash.

Quantities that are isequal but have different units still have different hashes. This should be fixed as well, but we need to be careful to not break things, see #379.

Closes #378.

@codecov
Copy link

codecov bot commented Dec 28, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (master@26cb2e6). Learn more about missing BASE report.

Additional details and impacted files
@@            Coverage Diff            @@
##             master     #833   +/-   ##
=========================================
  Coverage          ?   90.01%           
=========================================
  Files             ?       22           
  Lines             ?     1703           
  Branches          ?        0           
=========================================
  Hits              ?     1533           
  Misses            ?      170           
  Partials          ?        0           

☔ View full report in Codecov by Sentry.
📢 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.

@sostock sostock merged commit f509770 into JuliaPhysics:master Jan 29, 2026
15 checks passed
@sostock sostock deleted the hash_equalunits branch January 29, 2026 10:43
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.

Should hashing of Quantity{BigFloat} behave differently to those of BigFloat's?

1 participant