-
Notifications
You must be signed in to change notification settings - Fork 22
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
Add support for three-arg div
to FixedDecimals in Julia 1.4+
#51
Conversation
This commit simply implements `div(x,y,::RoundingMode)` for FixedDecimals by delegating to `div` of the fields.
Before: ```julia julia> let FD2 = FixedDecimal{Int,2} cld(FD2(0.01), FD2(2)) end FixedDecimal{Int64,2}(0.00) ``` After: ```julia julia> let FD2 = FixedDecimal{Int,2} cld(FD2(0.01), FD2(2)) end FixedDecimal{Int64,2}(1.00) ```
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alright, comments addressed, this should be good to go. :) Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Codecov Report
@@ Coverage Diff @@
## master #51 +/- ##
==========================================
+ Coverage 92.13% 97.76% +5.63%
==========================================
Files 1 1
Lines 178 179 +1
==========================================
+ Hits 164 175 +11
+ Misses 14 4 -10
Continue to review full report at Codecov.
|
This PR adds support for three-arg div by implementing
div(x,y,::RoundingMode)
for FixedDecimals that delegates todiv
of the fields.Remaining question: Is this enough? Do we also need to implement the three-arg
fld
,mod
, etc?Fixes #50.