4

I use $\odot$ for element-wise multiplication of vectors and matrices, and $\oslash$ for element-wise division. What are good ways of denoting an element-wise exponential function? I have tried, using amsmath, \overset{\circ}{\exp} or \exp_\circ, but I don't like any of those very much.

3
  • Taking a stab...how about \usepackage{stackengine}\stackMath$\,\stackinset{c}{}{c}{}{\bigcirc}{e}\,$ Oct 16, 2015 at 13:31
  • 2
    What is the commonly used symbol for this in the literature? Oct 16, 2015 at 13:32
  • Sorry, I don't know. I would not ask if I knew about one ;)
    – bers
    Oct 16, 2015 at 17:21

3 Answers 3

2

One option:

\documentclass{article}
\usepackage{amsmath}

\newcommand{\Pexp}{\mathbin{\text{$\vcenter{\hbox{\textcircled{$e$}}}$}}}

\begin{document}

${\displaystyle A \Pexp B}\quad
A \Pexp B\quad
L_{A \Pexp B}\quad 
M_{L_{A \Pexp B}} 
$

\end{document}

enter image description here

2

I thank everyone for their answers so far, but since my question is very subjective (based on 'I don't like [...] very much'), I take the freedom of not accepting any of those (yet). (Also, I will not accept mine yet, because I am not overly happy with the result.) It is still interesting that both of you, @GonzaloMedina and @StevenB.Segletes, have come up with very similar proposals; however, one requirement (which I did not have when posting the original question) is that I also need an element-wise logarithm, and a circled l is very difficult to typeset comparably to a circled e. Similarly, \textcircled{e}^{x}, which I briefly considered, does not easily extend to the logarithm. So here's a comparison of all the options so far; I slightly prefer those which also show the corresponding solutions for \log:

enter image description here

\documentclass[preview]{standalone}
\usepackage{amsmath}

% Steven B. Segletes
\usepackage{stackengine,scalerel}
\def\Vexp{\mathbin{\ThisStyle{\stackinset{c}{-.1\LMpt}{c}{}{%
  $\SavedStyle e$}{$\SavedStyle\bigcirc$}}}}

% Gonzalo Medina
\newcommand{\Pexp}{\mathbin{\text{$\vcenter{\hbox{\textcircled{$e$}}}$}}}

% myself
\let\expe\exp
\patchcmd{\expe}{exp}{exp\circ}{}{}

\let\loge\log
\patchcmd{\loge}{log}{log\circ}{}{}

\makeatletter
\newcommand{\expo}{\mathop{\overset{\circ\hphantom{\rule{0.10em}{0em}}}{\smash[t]{\operator@font exp}\vphantom{\rule[0.35em]{0em}{0em}}}}\nolimits}
\newcommand{\logo}{\mathop{\overset{\circ\hphantom{\rule{0.22em}{0em}}}{\smash[t]{\operator@font log}\vphantom{\rule[0.35em]{0em}{0em}}}}\nolimits}
\makeatother

\begin{document}
    \begin{equation*}
    \begin{array}{lllll}
        {\displaystyle A \Vexp B} &
        {\textstyle A \Vexp B} & 
        L_{A \Vexp B} & 
        M_{L_{A \Vexp B}} &
        \scriptscriptstyle A \Vexp B \\

        {\displaystyle A \Pexp B} & 
        {\textstyle A \Pexp B} &
        L_{A \Pexp B}& 
        M_{L_{A \Pexp B}} &
        \scriptscriptstyle A \Pexp B \\

        {\displaystyle A \Vexp^B} &
        {\textstyle A \Vexp^B} & 
        L_{A \Vexp^B} & 
        M_{L_{A \Vexp^B}} &
        \scriptscriptstyle A \Vexp^B \\

        {\displaystyle A \Pexp^B} & 
        {\textstyle A \Pexp^B} &
        L_{A \Pexp^B}& 
        M_{L_{A \Pexp^B}} &
        \scriptscriptstyle A \Pexp^B \\

        {\displaystyle A \exp_\circ B} & 
        A \exp_\circ B &
        L_{A \exp_\circ B} &
        M_{L_{A \exp_\circ B}} &
        \scriptscriptstyle A \exp_\circ B \\

        {\displaystyle A \exp^\circ B} &
        {\textstyle A \exp^\circ B} & 
        L_{A \exp^\circ B} & 
        M_{L_{A \exp^\circ B}} & 
        \scriptscriptstyle A \exp^\circ B \\

        {\displaystyle A \expe B} &
        {\textstyle A \expe B} & 
        L_{A \expe B} & 
        M_{L_{A \expe B}} & 
        \scriptscriptstyle A \expe B \\

        {\displaystyle A \loge B} &
        {\textstyle A \loge B} & 
        L_{A \loge B} & 
        M_{L_{A \loge B}} & 
        \scriptscriptstyle A \loge B \\

        {\displaystyle A \exp B} &
        {\textstyle A \exp B} & 
        L_{A \exp B} & 
        M_{L_{A \exp B}} & 
        \scriptscriptstyle A \exp B \\

        {\displaystyle A \expo B} &
        {\textstyle A \expo B} & 
        L_{A \expo B} & 
        M_{L_{A \expo B}} & 
        \scriptscriptstyle A \expo B \\

        {\displaystyle A \log B} &
        {\textstyle A \log B} & 
        L_{A \log B} & 
        M_{L_{A \log B}} & 
        \scriptscriptstyle A \log B \\

        {\displaystyle A \logo B} &
        {\textstyle A \logo B} & 
        L_{A \logo B} & 
        M_{L_{A \logo B}} & 
        \scriptscriptstyle A \logo B \\
    \end{array}
    \end{equation*}
\end{document}
1

Expanding on my comment, and making it scalable to the math style...

\documentclass{article}
\usepackage{stackengine,scalerel}
\def\Vexp{\mathbin{\ThisStyle{\stackinset{c}{-.1\LMpt}{c}{}{%
  $\SavedStyle e$}{$\SavedStyle\bigcirc$}}}}
\begin{document}
$A\Vexp B \quad X_{A\Vexp B} \quad\scriptscriptstyle A\Vexp B$
\end{document}

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .