Evaluating functions with derivatives