In one of my computer programming projects I have defined the following quite common function:
$$ f(x) = \begin{cases} 0, & \text{ when } x = 0, \\ 1, & \text{ when } x \neq 0. \end{cases} $$
From what I understand, this is essentially an indicator function, more specifically $1_{x \neq 0}$. Unfortunately, most programming languages are quite restrictive in what one can use as an indentifier and mathematical symbols do not generally make the cut.
So, is there a standard name for this function? Something familiar to English-speaking$^1$ scientists that could be used in computer code$^2$?
$^1$ Yes, that means that something in, say, Sanskrit or Chinese would not be of much help.
$^2$ functionThatReturnsZeroForZeroInputAndOneOtherwise
is not very helpful either...
nonZeroIndicator()
or something... $\endgroup$