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; \ |
} \ |