jump-dev / MutableArithmetics.jl

Interface for arithmetics on mutable types in Julia
Mozilla Public License 2.0
50 stars 8 forks source link

Promote div and / in the same way #270

Closed hersle closed 7 months ago

hersle commented 7 months ago

The current operation promotion falls back to 0 / 1 for /, but div(0, 0) for div, giving the DivideError in #240. This fixes that.

odow commented 7 months ago

Nice! Could you add a new test for this to the bottom of https://github.com/jump-dev/MutableArithmetics.jl/blob/master/test/interface.jl?

codecov[bot] commented 7 months ago

Codecov Report

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

Project coverage is 91.95%. Comparing base (5e901e1) to head (d2c8341).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #270 +/- ## ========================================== + Coverage 91.71% 91.95% +0.23% ========================================== Files 23 23 Lines 2173 2200 +27 ========================================== + Hits 1993 2023 +30 + Misses 180 177 -3 ```

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

hersle commented 7 months ago

I added a test 😃

odow commented 7 months ago

The formatter is very particular :smile: but it does help unify the code across all of jump-dev.

hersle commented 7 months ago

That's alright :smile: