Added functions to handle floats and doubles