From b9d845b9abf49e8f619cd65cd699495506e7a084 Mon Sep 17 00:00:00 2001 From: fyodor Date: Tue, 31 Mar 2009 22:29:03 +0000 Subject: [PATCH] Change 10 to 10.0 in pow() calls to make it clear that it is a double --- output.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/output.cc b/output.cc index 6b66cb602..db2fd1111 100644 --- a/output.cc +++ b/output.cc @@ -1331,8 +1331,8 @@ static char *num_to_string_sigdigits(double d, unsigned int digits) { shift = -digits; } else { shift = floor(log10(fabs(d))) - digits + 1; - d = floor(d / pow(10, shift) + 0.5); - d = d * pow(10, shift); + d = floor(d / pow(10.0, shift) + 0.5); + d = d * pow(10.0, shift); } n = Snprintf(buf, sizeof(buf), "%.*f", MAX(0, -shift), d);