Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use muladd in aleph calculation in _quantile to avoid some rounding errors #184

Merged
merged 2 commits into from
Jan 3, 2025

Conversation

andreasnoack
Copy link
Member

@andreasnoack andreasnoack commented Jan 2, 2025

In some cases when aleph is an integer (in exact) arithmetic, the calculation of aleph via m can introduce some rounding errors that makes the value non-integer. Using muladd avoids this in some cases.

@andreasnoack andreasnoack requested a review from nalimilan January 2, 2025 15:43
@andreasnoack andreasnoack changed the title Use muladd in aleph calculation in _quantile to avoid some rounding Use muladd in aleph calculation in _quantile to avoid some rounding errors Jan 2, 2025
errors.

In some cases when aleph is an integer (in exact) arithmetic, the
calculation of aleph via m can introduce some rounding errors that
makes the value non-integer. Using muladd avoids this in some cases.
@codecov-commenter
Copy link

codecov-commenter commented Jan 2, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.65%. Comparing base (793733e) to head (6bd1531).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #184   +/-   ##
=======================================
  Coverage   96.65%   96.65%           
=======================================
  Files           2        2           
  Lines         448      448           
=======================================
  Hits          433      433           
  Misses         15       15           

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

src/Statistics.jl Outdated Show resolved Hide resolved
Co-authored-by: Milan Bouchet-Valat <[email protected]>
@andreasnoack andreasnoack merged commit bfa5c6b into master Jan 3, 2025
13 checks passed
@andreasnoack andreasnoack deleted the an/quantilemuladd branch January 3, 2025 11:56
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.

3 participants