Multiply floats by 1e6, not 1000000ULL. It probably makes no difference in practice.