kthohr / gcem
Showing 1 of 2 files from the diff.

@@ -46,7 +46,26 @@
Loading
46 46
template<typename T>
47 47
constexpr
48 48
T
49 -
sqrt_check(const T x, const T m_val)
49 +
sqrt_simplify(const T x, const T m_val)
50 +
noexcept
51 +
{
52 +
    return( x > T(1e+08) ? \
53 +
                sqrt_simplify(x / T(1e+08), T(10000) * m_val) :
54 +
            x > T(1e+06) ? \
55 +
                sqrt_simplify(x / T(1e+06), T(1000) * m_val) :
56 +
            x > T(10000) ? \
57 +
                sqrt_simplify(x / T(10000), T(100) * m_val) :
58 +
            x > T(100) ? \
59 +
                sqrt_simplify(x / T(100), T(10) * m_val) :
60 +
            x > T(4) ? \
61 +
                sqrt_simplify(x / T(4), T(2) * m_val) :
62 +
                m_val * sqrt_recur(x, x / T(2), 0) );
63 +
}
64 +
65 +
template<typename T>
66 +
constexpr
67 +
T
68 +
sqrt_check(const T x)
50 69
noexcept
51 70
{
52 71
    return( is_nan(x) ? \
@@ -63,9 +82,7 @@
Loading
63 82
            GCLIM<T>::min() > abs(T(1) - x) ? \
64 83
                x :
65 84
            // else
66 -
            x > T(4) ? \
67 -
                sqrt_check(x/T(4), T(2)*m_val) :
68 -
                m_val * sqrt_recur(x, x/T(2), 0) );
85 +
            sqrt_simplify(x, T(1)) );
69 86
}
70 87
71 88
}
@@ -84,7 +101,7 @@
Loading
84 101
sqrt(const T x)
85 102
noexcept
86 103
{
87 -
    return internal::sqrt_check( static_cast<return_t<T>>(x), return_t<T>(1) );
104 +
    return internal::sqrt_check( static_cast<return_t<T>>(x) );
88 105
}
89 106
90 107
#endif
Files Coverage
include/gcem_incl 77.88%
tests 95.85%
Project Totals (70 files) 85.01%

No yaml found.

Create your codecov.yml to customize your Codecov experience

Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading