Functions for boolean operators, that return 1 or 0 Are there any purely mathematical expressions that are equivalent to boolean operators and return $1$ or $0$?
For example: $a > b$
Is there any $f(a, b)$ for which if $a>b$, $f(a,b)=1$ and if $a < b$, $f(a,b)=0$? 
Can you express such a function with a simple expression and with no branches/multiple definitions ?

Using the absolute value, for example, a possible expression is $f(a,b)=\frac12\Big(1+\frac{a-b}{|a-b|}\Big)$. If you don't like the absolute value this can be rewritten as $f(a,b)=\frac12\left(1+\frac{a-b}{\sqrt{(a-b)^2}}\right)$.
