Calculates the reciprocation of a function.