Home | History | Annotate | Download | only in src

Lines Matching defs:Double

37 static uint64_t double_to_uint64(double d) { return BitCast<uint64_t>(d); }
38 static double uint64_to_double(uint64_t d64) { return BitCast<double>(d64); }
41 class Double {
51 Double() : d64_(0) {}
52 explicit Double(double d) : d64_(double_to_uint64(d)) {}
53 explicit Double(uint64_t d64) : d64_(d64) {}
54 explicit Double(DiyFp diy_fp)
57 // The value encoded by this Double must be greater or equal to +0.0.
65 // The value encoded by this Double must be strictly greater than 0.
71 // The current double could be a denormal.
82 // Returns the double's bit as uint64.
87 // Returns the next greater double. Returns +infinity on input +infinity.
88 double NextDouble() const {
89 if (d64_ == kInfinity) return Double(kInfinity).value();
95 return Double(d64_ - 1).value();
97 return Double(d64_ + 1).value();
120 // Returns true if the double is a denormal.
150 // Precondition: the value encoded by this Double must be greater or equal
160 // Precondition: the value encoded by this Double must be greater than 0.
184 double value() const { return uint64_to_double(d64_); }
189 // once its encoded into a double. In almost all cases this is equal to