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

Unified Diff: src/cached_powers.h

Issue 866002: Fast double-to-ascii conversion. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 years, 9 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 | « src/SConscript ('k') | src/checks.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/cached_powers.h
===================================================================
--- src/cached_powers.h (revision 4092)
+++ src/cached_powers.h (working copy)
@@ -65,8 +65,8 @@
#define COMPUTE_FOR_CACHE(i) \
if (!found && (gamma - alpha + 1 >= GRISU_CACHE_MAX_DISTANCE(i))) { \
int kQ = DiyFp::kSignificandSize; \
- int k = ceiling((alpha - e + kQ - 1) * kD_1_LOG2_10); \
- int index = (GRISU_CACHE_OFFSET + k - 1) / i + 1; \
+ double k = ceiling((alpha - e + kQ - 1) * kD_1_LOG2_10); \
+ int index = (GRISU_CACHE_OFFSET + static_cast<int>(k) - 1) / i + 1; \
cached_power = GRISU_CACHE_NAME(i)[index]; \
found = true; \
} \
« no previous file with comments | « src/SConscript ('k') | src/checks.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698