# sfmath: bug or feature? Tildes are wrongly displayed

If I compile the following code (TeXLive 2011; Mac OS X 10.7.2, latexmk 4.26), I get wrongly placed tildes (in the middle of the letters instead of on top of them). Is this a bug?

\documentclass{article}

\usepackage[T1]{fontenc}
\usepackage{lmodern}
\renewcommand{\familydefault}{\sfdefault}
\usepackage[lm,T1experimental]{sfmath}
\usepackage[american]{babel}

\begin{document}
$\tilde{\psi}$ $\tilde{A}$
\end{document}

-
Removing \usepackage{lmodern} and the lm package option from sfmath seems to solve the problem. Note the package Bugs and Limitations: "The font metrics are not adjusted to math usage (this may result in typographically unsatisfying results)." –  Werner Oct 30 '11 at 17:32
Thanks, Werner. I was hoping that there is a method with lmodern... –  Marius Hofert Oct 30 '11 at 18:29
By the way, it's still wrong if you put in $\hat{A}$ [the hat is not perfectly placed] –  Marius Hofert Oct 30 '11 at 18:35
That's true, and that's perhaps why messages like "The functionality of this package is limited by the intention to work without additionally defined (virtual) fonts; instead, only standard fonts are used" are also given. If you're interested in manipulating the accents, use the accents package. –  Werner Oct 30 '11 at 18:47
Thanks. Is there any other solution to get sans serif math fonts? As far as I know, sfmath is the best approach. But I won't start fixing accents since that's not the only problem. lmodern is a must-have for me. –  Marius Hofert Oct 30 '11 at 18:52

\renewcommand{\tilde}{\mathaccent"767E }

The second line is needed if you use amsmath.