Collapsed terminology for simple logarithmic procedure

16 Views Asked by At

During some computation, I had to rescale a value $x$ by taking the $\log_{10}(x)$. If $x$ was positive, I merely took the log, but if $x$ was negative i used -$\log_{10}(|x|)$. Is there a shorter way to state that this was done using one equation with perhaps $\pm$ in it, or perhaps the $\mathrm{sgn}()$ function? I would rather not write that I used both $\log_{10}(x)$ when $x>0$ and $-\log_{10}(|x|)$ when $x<0$. I am thinking there's one equation to show this.