#2925: overflow in rat Comment (by Roland Haas): using
Reporter: Roland Haas Status: new Milestone: Version: Type: bug Priority: minor Component: uint64_t rollover is indeed simpler though:// TODO: need special code to handle the case if a or b is int64_min since -int64_min > int64_max (https://en.cppreference.com/w/cpp/numeric/math/abs#Notes)
int64_t save_mult(int64_t a, int64_t b) {
int64_t sign = (a > 0) ^ (b > 0);
uint64_t abs_a = std::abs(a);
uint64_t abs_b = std--
Ticket URL: https://bitbucket.org/einsteintoolkit/tickets/issues/2925/overflow-in-rat-in-arith