Fancier version of the function equality tester