My question is very similar to this question. The difference is that my function is taking in two arguments, not just one.
I need a function similar to f(a, b) = log(a / b) except it should output values with a range between [0,1] or [-1,1]. Currently, the result of log(a / b) ranges from -infinity to +infinity. Note that a and b will always be positive integers. Also, it is perfectly acceptable to say "a must be bigger than b" if that is convenient.
For my purposes, log(a/b) is great because log(a/b) + log(b/a) = 0. I just need to restrict the range.
If the range of the function is [0,1], then I'd like it so that f(a,b) - f(b,a) = 0.
If the range of the function is [-1,1], then I'd like it so that f(a,b) + f(b,a) = 0.