move _make_fraction method out of Function class
improve error output