  High-precision variational calculations of the operators for the relativistic
corrections in the leading $m\alpha^4$ order are presented. The ro-vibrational
states in the range of the total orbital angular momentum $L\!=\!0\!-\!4$ and
vibrational quantum number $v\!=\!0\!-\!10$ for the $\mbox{H}_2^+$ and
$\mbox{HD}^+$ molecular ions are considered. We estimate that about ten
significant digits are obtained. This high precision is required for making
theoretical predictions for transition frequencies at the level of $10^{-12}$
relative uncertainty.
