# An operator that returns 0 for all negative values otherwise returns the input

I need to define a function that returns 0 if the input $v < 0$. Otherwise It returns $v$. But I wanted to avoid writing it as a conditional expression. So I defined the following operator $\vert \_ \vert^{+}$ where $\_$ is the placeholder.

$$\vert \_ \vert^{+} = \frac{1}{2}(\_ + \vert \_ \vert)$$

$\vert \_ \vert$ returns the absolute value of $\_$. But am I redefining something. Does this function have a name ? then I will replace this operator with the known name.

• This is often denoted by $x\mapsto x^+$. – Lord Shark the Unknown Mar 7 '18 at 10:35

It sounds like you just want $v$ multiplied by the Heaviside unit step function, denoted $u(v)$ or $H(v)$. So
$$f(v) = v\cdot u(v)$$