|
Dynamic Fraction Library 1.0.0
Reference-counted arbitrary precision rational number library (MIT OR Unlicense)
|
Helper functions for detecting fixed-size arithmetic overflow. More...
Functions | |
| bool | di_add_overflow_int32 (int32_t a, int32_t b, int32_t *result) |
| Add two int32_t values with overflow detection. | |
| bool | di_subtract_overflow_int32 (int32_t a, int32_t b, int32_t *result) |
| Subtract two int32_t values with overflow detection. | |
| bool | di_multiply_overflow_int32 (int32_t a, int32_t b, int32_t *result) |
| Multiply two int32_t values with overflow detection. | |
| bool | di_add_overflow_int64 (int64_t a, int64_t b, int64_t *result) |
| Add two int64_t values with overflow detection. | |
| bool | di_subtract_overflow_int64 (int64_t a, int64_t b, int64_t *result) |
| Subtract two int64_t values with overflow detection. | |
| bool | di_multiply_overflow_int64 (int64_t a, int64_t b, int64_t *result) |
| Multiply two int64_t values with overflow detection. | |
Helper functions for detecting fixed-size arithmetic overflow.
| bool di_add_overflow_int32 | ( | int32_t | a, |
| int32_t | b, | ||
| int32_t * | result | ||
| ) |
Add two int32_t values with overflow detection.
| a | First operand |
| b | Second operand |
| result | Pointer to store result |
Definition at line 1727 of file dynamic_int.h.
| bool di_add_overflow_int64 | ( | int64_t | a, |
| int64_t | b, | ||
| int64_t * | result | ||
| ) |
Add two int64_t values with overflow detection.
| a | First operand |
| b | Second operand |
| result | Pointer to store result |
Definition at line 1757 of file dynamic_int.h.
| bool di_multiply_overflow_int32 | ( | int32_t | a, |
| int32_t | b, | ||
| int32_t * | result | ||
| ) |
Multiply two int32_t values with overflow detection.
| a | First operand |
| b | Second operand |
| result | Pointer to store result |
Definition at line 1747 of file dynamic_int.h.
| bool di_multiply_overflow_int64 | ( | int64_t | a, |
| int64_t | b, | ||
| int64_t * | result | ||
| ) |
Multiply two int64_t values with overflow detection.
| a | First operand |
| b | Second operand |
| result | Pointer to store result |
Definition at line 1775 of file dynamic_int.h.
| bool di_subtract_overflow_int32 | ( | int32_t | a, |
| int32_t | b, | ||
| int32_t * | result | ||
| ) |
Subtract two int32_t values with overflow detection.
| a | Minuend |
| b | Subtrahend |
| result | Pointer to store result |
Definition at line 1737 of file dynamic_int.h.
| bool di_subtract_overflow_int64 | ( | int64_t | a, |
| int64_t | b, | ||
| int64_t * | result | ||
| ) |
Subtract two int64_t values with overflow detection.
| a | Minuend |
| b | Subtrahend |
| result | Pointer to store result |
Definition at line 1766 of file dynamic_int.h.