Fix float/double compiler cast warning.