Skip to content

Commit 46a0e3c

Browse files
committed
Add more diagnostics
1 parent 26f3144 commit 46a0e3c

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

include/boost/int128/numeric.hpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,16 +198,21 @@ inline int128_t mul_sat<true>(const int128_t x, const int128_t y) noexcept
198198

199199
if ((x_bits + y_bits) > std::numeric_limits<int128_t>::digits)
200200
{
201+
std::cout << "X: " << x << '\n'
202+
<< "Y: " << y << std::endl;
201203
if ((x < 0) != (y < 0))
202204
{
205+
std::cout << "Min Value Return: " << std::numeric_limits<int128_t>::min() << std::endl;
203206
return std::numeric_limits<int128_t>::min();
204207
}
205208
else
206209
{
210+
std::cout << "Max Value Return: " << std::numeric_limits<int128_t>::max() << std::endl;
207211
return std::numeric_limits<int128_t>::max();
208212
}
209213
}
210214
const int128_t res {x * y};
215+
std::cout << "Func x: " << x << ", Func y: " << y << std::endl;
211216
std::cout << "x * y: " << res << std::endl;
212217
return res;
213218
}

0 commit comments

Comments
 (0)