Let $(\mathcal{M},g)$ be a $C^{\infty}$-Riemannian manifold. A basic fact is that $g$ endows the manifold $\mathcal{M}$ with a metric space structure, that is, we can define a distance function $d:\mathcal{M}\times\mathcal{M}\longrightarrow\mathcal{M}$$d:\mathcal{M}\times\mathcal{M}\longrightarrow\mathbb{R}$ (the distance between two points will be the infimum of the lengths of the curves which join the points) which is compatible with the topology of $\mathcal{M}$. Of course $d$ is continuous function, but what can we say about the differentiability of $d$?, is it smooth?. If not, Is there some criterion to know when it is?
Thanks in advance.