Conditions:
- Variables: X, L
- if X = L result of the formula should be
-Lotherwise it should be0
So $$f(X,L)=\begin{cases}-L&X=L\\0&\text X\ne L\end{cases}$$
Is it possible to construct a formula fulfilling these conditions using only elementary arithmetic/functions?
How about $$-L\delta_{ (X, L)}$$ where $\delta$ is the Kronecker $\delta$ function?
Or if that is not elementary enough: $$-L\lim_{ t \to L} \frac {t-L}{t-X}$$