I have been trying to find a function f: R->R such that lim x->c f(x) exists when c is irrational and the limit doesn't exist when c is rational. I tried variations of the Dirichlet function and Thomae's function, but I couldn't get anywhere. I also tried proving that such a function cannot exist, using the fact that both the rationals and the irrationals are dense in real numbers. But I couldn't get a satisfying proof that way either.