1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-15 04:09:01 +00:00

Change 10 to 10.0 in pow() calls to make it clear that it is a double

This commit is contained in:
fyodor
2009-03-31 22:29:03 +00:00
parent d46395db25
commit b9d845b9ab

View File

@@ -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);