Definitely not. In common case this problem upcomes to Kolmogorov complexity problem, which is incomputable in terms of algorithm theory.
May be, if you'll add conditions for your function (for example, it is polynom with discrete coefficients and powers) - then you'll have a chance.