I've been trying to create a function that will return $0$ when $x$ is $0$, and for any other $x$ value it should return $1$. I've searched for a pre-existing function online too and wasn't able to find one.
Do you know of any function that can do this?
How about $f(x)=\left\lceil\frac{x^2}{x^2+1}\right\rceil$
*Works for real numbers, with imaginary numbers you may divide by 0.