Using functions in math expressions