10 #include "src/base/logging.h" 22 static const int kSignificandSize = 64;
24 DiyFp() : f_(0), e_(0) {}
25 DiyFp(uint64_t f,
int e) : f_(f), e_(e) {}
31 void Subtract(
const DiyFp& other) {
32 DCHECK(e_ == other.e_);
33 DCHECK(f_ >= other.f_);
48 void Multiply(
const DiyFp& other);
64 const uint64_t k10MSBits =
static_cast<uint64_t
>(0x3FF) << 54;
65 while ((f & k10MSBits) == 0) {
69 while ((f & kUint64MSB) == 0) {
83 uint64_t f()
const {
return f_; }
84 int e()
const {
return e_; }
86 void set_f(uint64_t new_value) { f_ = new_value; }
87 void set_e(
int new_value) { e_ = new_value; }
90 static const uint64_t kUint64MSB =
static_cast<uint64_t
>(1) << 63;
99 #endif // V8_DIY_FP_H_