diff --git a/src/threads/fixed-point.h b/src/threads/fixed-point.h index c6872cf..b192073 100644 --- a/src/threads/fixed-point.h +++ b/src/threads/fixed-point.h @@ -18,6 +18,9 @@ #define FP_SUBTRACT_INT(x, n) ((x) - ((n) * (CONVERSION_CONST))) /* Fixed Point Arithmetic multiplication operations */ - +#define FP_MULTIPLY(x, y) ((int64_t)(x)) * (y) / (CONVERSION_CONST) +#define FP_MULTIPLY_INT(x, n) ((x) * (n)) +#define FP_DIVIDE(x, y) ((int64_t)(x)) * (CONVERSION_CONST) / (y) +#define FP_DIVIDE_INT(x, n) ((x) / (n)) #endif //FIXED_POINT_H