A/b ÷ c/d

In dividing fractions, one needs to multiply the first fraction by the reciprocal, or the 1/x,  of the other fraction.

So, a/b ÷ c/d = a/b × d/c = ad/bc

What kind of distances do you want? 
1 3 1
the ones that is like |-|-2| | (sorry if its wrong but its like that)
Absolute value? Absolute value of real numbers is the distance of the number from the origin, 0. |2| = 2; |-9| = 0. So, basically, you just need to make the number positive because distance can never be negative, unless it is a directed.