Bitcoin ABC 0.26.3
P2P Digital Currency
|
#include <cstdlib>
#include <limits>
Go to the source code of this file.
Functions | |
static bool | AddInt63OverflowEmulated (int64_t a, int64_t b, int64_t &result) |
Computes a + b and stores it in result. | |
static bool | AddInt63Overflow (int64_t a, int64_t b, int64_t &result) |
Computes a + b and stores it in result. | |
static bool | SubInt63OverflowEmulated (int64_t a, int64_t b, int64_t &result) |
Computes a - b and stores it in result. | |
static bool | SubInt63Overflow (int64_t a, int64_t b, int64_t &result) |
Computes a - b and stores it in result. | |
Computes a + b and stores it in result.
If the sum overflows or results in an invalid 63+sign-bit integer, return true, otherwise false. Uses built-in overflow functions if available, and emulated overflow math otherwise.
Definition at line 34 of file intmath.h.
Computes a + b and stores it in result.
If the sum overflows or results in an invalid 63+sign-bit integer, return true, otherwise false. Overflow checks are emulated and don't rely on built-in overflow checks.
Definition at line 15 of file intmath.h.
Computes a - b and stores it in result.
If the sum difference or results in an invalid 63+sign-bit integer, return true, otherwise false. Uses built-in overflow functions if available, and emulated overflow math otherwise.
Definition at line 69 of file intmath.h.
Computes a - b and stores it in result.
If the difference overflows or results in an invalid 63+sign-bit integer, return true, otherwise false. Overflow checks are emulated and don't rely on built-in overflow checks.
Definition at line 50 of file intmath.h.