- ff = f / 65536.0f; /* shift radix point by 16 bits */
- f = ff * 1000000.0f; /* Treat fraction as parts per million */
+ ff = f / 65536.0; /* shift radix point by 16 bits */
+ f = (int)(ff * 1000000.0); /* Treat fraction as parts per million */
ND_PRINT((ndo, "%d.%06d", i, f));
}
ND_PRINT((ndo, "%d.%06d", i, f));
}
- ff = ff / FMAXINT; /* shift radix point by 32 bits */
- f = ff * 1000000000.0f; /* treat fraction as parts per billion */
+ ff = ff / FMAXINT; /* shift radix point by 32 bits */
+ f = (uint32_t)(ff * 1000000000.0); /* treat fraction as parts per billion */
ND_PRINT((ndo, "%u.%09d", i, f));
#ifdef HAVE_STRFTIME
ND_PRINT((ndo, "%u.%09d", i, f));
#ifdef HAVE_STRFTIME
- ff = ff / FMAXINT; /* shift radix point by 32 bits */
- f = ff * 1000000000.0f; /* treat fraction as parts per billion */
+ ff = ff / FMAXINT; /* shift radix point by 32 bits */
+ f = (uint32_t)(ff * 1000000000.0); /* treat fraction as parts per billion */
ND_PRINT((ndo, "%s%d.%09d", signbit ? "-" : "+", i, f));
}
ND_PRINT((ndo, "%s%d.%09d", signbit ? "-" : "+", i, f));
}