> Why cast to double?

Otherwise msvc complains about implicit `int64_t` -> `double` conversion which has the potential to lose data.