JuliaMath / FixedPointNumbers.jl

fixed point types for julia
Other
79 stars 34 forks source link

Move arithmetic functions into submodule `FixedPointArithmetic` #304

Open kimikage opened 1 month ago

kimikage commented 1 month ago

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
codecov[bot] commented 1 month ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

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

Additional details and impacted files ```diff @@ 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 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.