#ifndef V8_BIGINT_DIGIT_ARITHMETIC_H_
#define V8_BIGINT_DIGIT_ARITHMETIC_H_
#include "src/bigint/bigint.h"
#include "src/bigint/util.h"
namespace v8 {
namespace bigint {
static constexpr int kHalfDigitBits = …;
static constexpr digit_t kHalfDigitBase = …;
static constexpr digit_t kHalfDigitMask = …;
constexpr bool digit_ismax(digit_t x) { … }
inline digit_t digit_add2(digit_t a, digit_t b, digit_t* carry) { … }
inline digit_t digit_add3(digit_t a, digit_t b, digit_t c, digit_t* carry) { … }
inline digit_t digit_sub(digit_t a, digit_t b, digit_t* borrow) { … }
inline digit_t digit_sub2(digit_t a, digit_t b, digit_t borrow_in,
digit_t* borrow_out) { … }
inline digit_t digit_mul(digit_t a, digit_t b, digit_t* high) { … }
static inline digit_t digit_div(digit_t high, digit_t low, digit_t divisor,
digit_t* remainder) { … }
}
}
#endif