write above symbol latex code example
Example 1: tex write above
$\overset{\mathrm{def}}{=}$
Example 2: latex equals with text
$\stackrel{sometext}{=}$
Example 3: text over equal latex
\documentclass[preview]{standalone}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\newcommand{\approxtext}[1]{\ensuremath{\stackrel{\text{#1}}{\approx}}}
\begin{document}
$\displaystyle
A \stackrel{\text{text}}{\approx} B
$,
$\displaystyle
A \approxtext{test} B
$
\end{document}