Decimals.jl icon indicating copy to clipboard operation
Decimals.jl copied to clipboard

package modernization including better type stability

Open ExpandingMan opened this issue 6 years ago • 2 comments

Seemed like this package needed a bit of an overhaul as it appears to be basically the default arbitrary precision decimal arithmetic package. It still needs a ton of work, but I think this is a good start. The most significant improvement is in type stability as the fields of Decimal are now concrete types.

At first I was going to make Decimal parametric with a type parameter for the exponent, but ultimately I decided that the benefit if this was pretty dubious, so I set the exponent to simply be an Int. Because of this, these changes should be pretty much non-breaking.

ExpandingMan avatar Nov 22 '19 17:11 ExpandingMan

Pull Request Test Coverage Report for Build 113

  • 12 of 15 (80.0%) changed or added relevant lines in 4 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-2.6%) to 92.638%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/decimal.jl 6 9 66.67%
<!-- Total: 12 15
Totals Coverage Status
Change from base Build 111: -2.6%
Covered Lines: 302
Relevant Lines: 326

💛 - Coveralls

coveralls avatar Nov 22 '19 17:11 coveralls

Codecov Report

Merging #42 into master will decrease coverage by 2.55%. The diff coverage is 80%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #42      +/-   ##
==========================================
- Coverage   95.28%   92.72%   -2.56%     
==========================================
  Files           6        6              
  Lines         106      110       +4     
==========================================
+ Hits          101      102       +1     
- Misses          5        8       +3
Impacted Files Coverage Δ
src/round.jl 91.66% <ø> (ø) :arrow_up:
src/arithmetic.jl 80% <100%> (ø) :arrow_up:
src/equals.jl 100% <100%> (ø) :arrow_up:
src/Decimals.jl 100% <100%> (ø) :arrow_up:
src/decimal.jl 90.47% <66.66%> (-6.9%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update b7f569e...b684caf. Read the comment docs.

codecov-io avatar Nov 22 '19 17:11 codecov-io