singularities: make it handle only rationals functions