fix implicit cast warnings

(Implicit conversion turns floating-point number into integer: 'double' to 'uint64_t' (aka 'unsigned long long'))