File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed
Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -283,8 +283,7 @@ constexpr uint128_t gcd(uint128_t a, uint128_t b) noexcept
283283
284284constexpr int128_t gcd (const int128_t a, const int128_t b) noexcept
285285{
286- const auto res {static_cast <int128_t >(gcd (static_cast <uint128_t >(abs (a)), static_cast <uint128_t >(abs (b))))};
287- return (a < 0 ) != (b < 0 ) ? -res : res;
286+ return static_cast <int128_t >(gcd (static_cast <uint128_t >(abs (a)), static_cast <uint128_t >(abs (b))));
288287}
289288
290289constexpr uint128_t lcm (const uint128_t a, const uint128_t b) noexcept
@@ -303,8 +302,7 @@ constexpr uint128_t lcm(const uint128_t a, const uint128_t b) noexcept
303302
304303constexpr int128_t lcm (const int128_t a, const int128_t b) noexcept
305304{
306- const auto res {static_cast <int128_t >(lcm (static_cast <uint128_t >(abs (a)), static_cast <uint128_t >(abs (b))))};
307- return (a < 0 ) != (b < 0 ) ? -res : res;
305+ return static_cast <int128_t >(lcm (static_cast <uint128_t >(abs (a)), static_cast <uint128_t >(abs (b))));
308306}
309307
310308} // namespace int128
You can’t perform that action at this time.
0 commit comments