Calculates the subtraction of two functions.