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

Move arithmetic functions into submodule FixedPointArithmetic #304

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kimikage
Copy link
Collaborator

This is a reworking of PR #292.
This moves only the definitions, leaving the implementations outside of FixedPointArithmetic.

This also adds new unchecked_* functions. (cf. OverflowContexts.jl)
Currently, unchecked_* falls back to wrapping_*.

This makes wrapping_* and saturating_* functions unexported.
We can use them with

using FixedPointNumbers.FixedPointArithmetic

or

using FixedPointNumbers.Saturating # and so on

Copy link

codecov bot commented May 28, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.01%. Comparing base (3242f10) to head (929bbf7).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #304      +/-   ##
==========================================
+ Coverage   96.93%   97.01%   +0.07%     
==========================================
  Files           7        8       +1     
  Lines         784      803      +19     
==========================================
+ Hits          760      779      +19     
  Misses         24       24              

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

This moves only the definitions, leaving the implementations outside of `FixedPointArithmetic`.
This also adds new `unchecked_*` functions.
Currently, `unchecked_*` falls back to `wrapping_*`.
This makes `wrapping_*` and `saturating_*` functions unexported.
@kimikage kimikage marked this pull request as ready for review May 28, 2024 05:53
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.

1 participant