Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(800)

Unified Diff: Source/wtf/dtoa/diy-fp.h

Issue 20300002: Fix trailing whitespace in .cpp, .h, and .idl files (ex. Source/core) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/wtf/dtoa/cached-powers.h ('k') | Source/wtf/dtoa/double.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/wtf/dtoa/diy-fp.h
diff --git a/Source/wtf/dtoa/diy-fp.h b/Source/wtf/dtoa/diy-fp.h
index e843100a82aa34a628dcee8c2711f9ac50ef9e69..f6415428975f387c016d1ccadf6792d054d4ef3a 100644
--- a/Source/wtf/dtoa/diy-fp.h
+++ b/Source/wtf/dtoa/diy-fp.h
@@ -33,7 +33,7 @@
namespace WTF {
namespace double_conversion {
-
+
// This "Do It Yourself Floating Point" class implements a floating-point number
// with a uint64 significand and an int exponent. Normalized DiyFp numbers will
// have the most significant bit of the significand set.
@@ -42,10 +42,10 @@ namespace double_conversion {
class DiyFp {
public:
static const int kSignificandSize = 64;
-
+
DiyFp() : f_(0), e_(0) {}
DiyFp(uint64_t f, int e) : f_(f), e_(e) {}
-
+
// this = this - other.
// The exponents of both numbers must be the same and the significand of this
// must be bigger than the significand of other.
@@ -55,7 +55,7 @@ namespace double_conversion {
ASSERT(f_ >= other.f_);
f_ -= other.f_;
}
-
+
// Returns a - b.
// The exponents of both numbers must be the same and this must be bigger
// than other. The result will not be normalized.
@@ -64,23 +64,23 @@ namespace double_conversion {
result.Subtract(b);
return result;
}
-
-
+
+
// this = this * other.
void Multiply(const DiyFp& other);
-
+
// returns a * b;
static DiyFp Times(const DiyFp& a, const DiyFp& b) {
DiyFp result = a;
result.Multiply(b);
return result;
}
-
+
void Normalize() {
ASSERT(f_ != 0);
uint64_t f = f_;
int e = e_;
-
+
// This method is mainly called for normalizing boundaries. In general
// boundaries need to be shifted by 10 bits. We thus optimize for this case.
const uint64_t k10MSBits = UINT64_2PART_C(0xFFC00000, 00000000);
@@ -95,26 +95,26 @@ namespace double_conversion {
f_ = f;
e_ = e;
}
-
+
static DiyFp Normalize(const DiyFp& a) {
DiyFp result = a;
result.Normalize();
return result;
}
-
+
uint64_t f() const { return f_; }
int e() const { return e_; }
-
+
void set_f(uint64_t new_value) { f_ = new_value; }
void set_e(int new_value) { e_ = new_value; }
-
+
private:
static const uint64_t kUint64MSB = UINT64_2PART_C(0x80000000, 00000000);
-
+
uint64_t f_;
int e_;
};
-
+
} // namespace double_conversion
} // namespace WTF
« no previous file with comments | « Source/wtf/dtoa/cached-powers.h ('k') | Source/wtf/dtoa/double.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698