GCC Code Coverage Report


Directory: ./
Coverage: low: ≥ 0% medium: ≥ 75.0% high: ≥ 90.0%
Coverage Exec / Excl / Total
Lines: 100.0% 8 / 0 / 8
Functions: 100.0% 2 / 0 / 2
Branches: 50.0% 4 / 0 / 8

src/nt/gl/lcm/lib.hpp
Line Branch Exec Source
1 #pragma once
2
3 #include "../gcd/lib.hpp"
4
5 namespace tifa_libs {
6
7 template <int_c T, int_c U>
8 381 CEXP std::common_type_t<T, U> lcm(T a, U b) NE {
9 using V = std::common_type_t<T, U>;
10 using W = to_uint_t<V>;
11
4/8
std::common_type<unsigned int, unsigned int>::type tifa_libs::lcm<unsigned int, unsigned int>(unsigned int, unsigned int):
✓ Branch 0 taken 3 times.
✗ Branch 1 not taken.
✗ Branch 2 not taken.
✓ Branch 3 taken 3 times.
std::common_type<unsigned long, unsigned long>::type tifa_libs::lcm<unsigned long, unsigned long>(unsigned long, unsigned long):
✓ Branch 0 taken 378 times.
✗ Branch 1 not taken.
✗ Branch 2 not taken.
✓ Branch 3 taken 378 times.
381 retif_((!a || !b) [[unlikely]], 0);
12 381 auto [v, u] = minmax(a = abs(a), b = abs(b));
13 381 return u / (V)gcd_impl_::gcd__<W, W>(u, v) * v;
14 }
15
16 } // namespace tifa_libs
17