The absolute value allows me to denote the difference between A and B regardless of which one is bigger, like so: $|A-B|$ or abs(A-B) in e.g. R.
I'm trying to correctly denote a formula where i do the same with division of two positive numbers (say, $C$ and $D$). Again, i don't care which one is bigger, but i want the resulting ratio to be between $0$ and $1$. So the intended answer is $C/D$ if $D$ is bigger, and its reciprocal if $C$ is bigger. When i code this in R i can simply do: ifelse(D>C,C/D,D/C).
But is there a way to denote my desired result in a mathematically more acceptable way? Thanks so much!