TITLE: Limit of an inverse function
QUESTION [19 upvotes]: Let $f:\mathbb R\to \mathbb  R$ be an invertible function such that $$\lim_{x\to a} f(x)=b$$
for some $a,b\in \mathbb R$. 
Does it follow that $$\lim_{x\to b}f^{-1}(x)= a,$$
where $f^{-1}$ denotes the inverse function of $f$?
Edit: When I consider the $\epsilon,\delta$-definition of the limit, I feel that there should be an example that $\lim_{x\to b}f^{-1}(x)\neq a$ due to the fact that $\epsilon,\delta$-definition is not symmetric (for a given $\epsilon>0$, we find $\delta>0$ such that ....).
However, if we further assume that $f$ is cont., $$b=\lim_{x\to b}x=\lim_{x\to b}f\circ f^{-1}(x)=f(\lim_{x\to b}  f^{-1}(x)).$$
It follows that $\lim_{x\to b}  f^{-1}(x)=f^{-1}(b)=a$. Thus, one needs a discontinuous function to have a counter example. I wonder whether there is any simple function with this property.
@Floris Claassens'a answer shows that there are some "ugly functions" with this property.

REPLY [6 votes]: A counter-example with $a=b=0$ and $\lim_{x\to a}f(x)=f(a).$
Let $(b_n)_{n\in \Bbb N}$ be a strictly decreasing real sequence with $b_1=1/2$ and with $\lim_{n\to \infty}b_n=0.$
For $x\le 0$ let $f(x)=x.$ 
For $n\in \Bbb N$ let f map $(b_{n+1},b_n]$ bijectively onto $(b_{n+1},b_n).$ And let $f(n)=b_n.$ 
Let $f$ map $(b_1,\infty)\setminus \Bbb N$ bijectively onto $(b_1,\infty).$
Then $f:\Bbb R\to \Bbb R$ is a bijection, and $\lim_{x\to 0}f(x)=0=f(0).$ 
But $(b_n)_{n\in \Bbb N}$ converges to $0$ while $f^{-1} (b_n)=n, $ so $f^{-1}(x)$ does not converge  as $x\to 0.$