Skip to content

Commit 6d5abe2

Browse files
committed
Simplify log edge cases and update CodeCov
1 parent 2bdb167 commit 6d5abe2

File tree

3 files changed

+5
-27
lines changed

3 files changed

+5
-27
lines changed

.github/workflows/codecov.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ jobs:
6464
make gcov -f make_gcov_01_generic.gmk --jobs=8 MY_ALL_COV=0 MY_BOOST_ROOT=../../../boost-root MY_CC=${{ matrix.compiler }} MY_STD=${{ matrix.standard }}
6565
echo
6666
- name: upload-codecov
67-
uses: codecov/codecov-action@v3
67+
uses: codecov/codecov-action@v4
6868
with:
6969
files: ./test/cover/coverage.info
7070
token: ${{ secrets.CODECOV_TOKEN }}

include/boost/decimal/detail/cmath/log.hpp

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -47,19 +47,8 @@ constexpr auto log_impl(T x) noexcept
4747
}
4848
else if (x < one)
4949
{
50-
// Handle reflection, the [+/-] zero-pole, and non-pole, negative x.
51-
if (x > zero)
52-
{
53-
result = -log(one / x);
54-
}
55-
else if ((x == zero) || (-x == zero))
56-
{
57-
result = -std::numeric_limits<T>::infinity();
58-
}
59-
else
60-
{
61-
result = std::numeric_limits<T>::quiet_NaN();
62-
}
50+
// Handle reflection.
51+
result = -log(one / x);
6352
}
6453
else if(x > one)
6554
{

include/boost/decimal/detail/cmath/log10.hpp

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -71,19 +71,8 @@ constexpr auto log10_impl(T x) noexcept
7171
{
7272
if (x < one)
7373
{
74-
// Handle reflection, the [+/-] zero-pole, and non-pole, negative x.
75-
if (x > zero)
76-
{
77-
result = -log10(one / x);
78-
}
79-
else if ((x == zero) || (-x == zero))
80-
{
81-
result = -std::numeric_limits<T>::infinity();
82-
}
83-
else
84-
{
85-
result = std::numeric_limits<T>::quiet_NaN();
86-
}
74+
// Handle reflection.
75+
result = -log10(one / x);
8776
}
8877
else if(x > one)
8978
{

0 commit comments

Comments
 (0)