Use value_type rather than double.