Cast yint.sum() to float before using it in divide.