Fix float->toFloat cast in spec.