Function evaluation and comparison