GCC Code Coverage Report


Directory: ./
Coverage: low: ≥ 0% medium: ≥ 75.0% high: ≥ 90.0%
Coverage Exec / Excl / Total
Lines: 100.0% 5 / 0 / 5
Functions: 100.0% 1 / 0 / 1
Branches: 83.3% 5 / 0 / 6

src/nt/proot/is/lib.hpp
Line Branch Exec Source
1 #pragma once
2
3 #include "../../../math/qpow/mod/lib.hpp"
4
5 namespace tifa_libs {
6
7 template <std::unsigned_integral T, class It>
8 46672 CEXP bool is_proot(T g, T m, It pf_begin, It pf_end) NE {
9
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 46672 times.
46672 retif_((!g) [[unlikely]], false);
10
2/2
✓ Branch 2 taken 62195 times.
✓ Branch 3 taken 1204 times.
63399 for (; pf_begin != pf_end; ++pf_begin)
11
2/2
✓ Branch 2 taken 45468 times.
✓ Branch 3 taken 16727 times.
62195 if (qpow_mod(g, (m - 1) / *pf_begin, m) == 1) return false;
12 1204 return true;
13 }
14
15 } // namespace tifa_libs
16