Convert everything from float to double to avoid precision issues