I need to compute $\frac{const}{y}$, where $y$ may equal $0$ to present PC state in a human-readable format from exposed internal registers. Is it possible to build an expression of basic math operators ($+$, $-$, $/$, $($, $)$, $*$, $a^b$, $\ln(a)$) that evaluates to $0$, when $y=0$, and to $\frac{const}{y}$ otherwise? The resulting expression may be as complex as necessary, but may include only the listed operators.
There is a similar question, with a different result as a "fallback" value.
Using the idea from this answer: $$\frac{const*(1-0^y)}{y+0^y}$$