add double version of a float function