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

Unified Diff: src/double.h

Issue 4060001: Bignum implementation of Strtod. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: bignum.h changes that somehow disappeared earlier. Created 10 years, 1 month 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 | « src/bignum.cc ('k') | src/strtod.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/double.h
diff --git a/src/double.h b/src/double.h
index e805173e07e799249484df8f187c1c3ac61c05e5..9db8ea7c48b0339b5dab21a1a69cf991612b9efb 100644
--- a/src/double.h
+++ b/src/double.h
@@ -82,6 +82,11 @@ class Double {
return d64_;
}
+ double NextDouble() const {
+ if (d64_ == kInfinity) return kInfinity;
+ return Double(d64_ + 1).value();
+ }
+
int Exponent() const {
if (IsDenormal()) return kDenormalExponent;
@@ -120,19 +125,20 @@ class Double {
((d64 & kSignificandMask) != 0);
}
-
bool IsInfinite() const {
uint64_t d64 = AsUint64();
return ((d64 & kExponentMask) == kExponentMask) &&
((d64 & kSignificandMask) == 0);
}
-
int Sign() const {
uint64_t d64 = AsUint64();
return (d64 & kSignMask) == 0? 1: -1;
}
+ DiyFp UpperBoundary() const {
+ return DiyFp(Significand() * 2 + 1, Exponent() - 1);
+ }
// Returns the two boundaries of this.
// The bigger boundary (m_plus) is normalized. The lower boundary has the same
« no previous file with comments | « src/bignum.cc ('k') | src/strtod.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698