cppalliance / decimal

A C++14 implementation of IEEE 754 decimal floating point numbers
https://cppalliance.org/decimal/decimal.html
Boost Software License 1.0
17 stars 1 forks source link

Improve 32-bit addition implementation #689

Closed mborland closed 3 days ago

mborland commented 3 days ago

Removes a few branches and swaps from the existing implementation Closes: #687

codecov[bot] commented 3 days ago

Codecov Report

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

Project coverage is 99.1%. Comparing base (5719f40) to head (2a2c8f9).

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/cppalliance/decimal/pull/689/graphs/tree.svg?width=650&height=150&src=pr&token=drvY8nnV5S&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cppalliance)](https://app.codecov.io/gh/cppalliance/decimal/pull/689?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cppalliance) ```diff @@ Coverage Diff @@ ## develop #689 +/- ## ========================================= - Coverage 99.2% 99.1% -0.0% ========================================= Files 230 230 Lines 16407 16386 -21 Branches 1791 1781 -10 ========================================= - Hits 16262 16238 -24 - Misses 145 148 +3 ``` | [Files](https://app.codecov.io/gh/cppalliance/decimal/pull/689?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cppalliance) | Coverage Δ | | |---|---|---| | [include/boost/decimal/decimal32.hpp](https://app.codecov.io/gh/cppalliance/decimal/pull/689?src=pr&el=tree&filepath=include%2Fboost%2Fdecimal%2Fdecimal32.hpp&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cppalliance#diff-aW5jbHVkZS9ib29zdC9kZWNpbWFsL2RlY2ltYWwzMi5ocHA=) | `99.8% <100.0%> (-<0.1%)` | :arrow_down: | | [include/boost/decimal/decimal32\_fast.hpp](https://app.codecov.io/gh/cppalliance/decimal/pull/689?src=pr&el=tree&filepath=include%2Fboost%2Fdecimal%2Fdecimal32_fast.hpp&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cppalliance#diff-aW5jbHVkZS9ib29zdC9kZWNpbWFsL2RlY2ltYWwzMl9mYXN0LmhwcA==) | `97.2% <100.0%> (-0.1%)` | :arrow_down: | | [include/boost/decimal/detail/add\_impl.hpp](https://app.codecov.io/gh/cppalliance/decimal/pull/689?src=pr&el=tree&filepath=include%2Fboost%2Fdecimal%2Fdetail%2Fadd_impl.hpp&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cppalliance#diff-aW5jbHVkZS9ib29zdC9kZWNpbWFsL2RldGFpbC9hZGRfaW1wbC5ocHA=) | `100.0% <100.0%> (ø)` | | | [test/test\_decimal32.cpp](https://app.codecov.io/gh/cppalliance/decimal/pull/689?src=pr&el=tree&filepath=test%2Ftest_decimal32.cpp&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cppalliance#diff-dGVzdC90ZXN0X2RlY2ltYWwzMi5jcHA=) | `100.0% <100.0%> (ø)` | | ... and [3 files with indirect coverage changes](https://app.codecov.io/gh/cppalliance/decimal/pull/689/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cppalliance) ------ [Continue to review full report in Codecov by Sentry](https://app.codecov.io/gh/cppalliance/decimal/pull/689?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cppalliance). > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cppalliance) > `Δ = absolute (impact)`, `ø = not affected`, `? = missing data` > Powered by [Codecov](https://app.codecov.io/gh/cppalliance/decimal/pull/689?dropdown=coverage&src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cppalliance). Last update [5719f40...2a2c8f9](https://app.codecov.io/gh/cppalliance/decimal/pull/689?dropdown=coverage&src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cppalliance). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=cppalliance).