# Inverse/Reverse number [closed]

I am trying to compute certain score, which is the sum of all variables (e.g., $a$, $b$, $c$). The higher the value of a variable, the score will be higher. However, I have one variable, say $a$, which is in the unit of seconds (time), representing the speed. I expect the score to be higher if it is in higher speed, which means I will need to inverse/reverse the value of $a$.

There are two ways which I can think of:

(1) $\frac{1}{x}$

(2) $1 - (\frac{1}{1 + x})$

Any comments if these are the right ways?

## closed as unclear what you're asking by JMoravitz, Namaste, Paul Frost, Xander Henderson, HK LeeSep 1 '18 at 2:38

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

• The first function is decreasing on $\Bbb R^+$ while the second is increasing. They will give opposite sort orders. – dxiv Aug 31 '18 at 19:31
• How about more simply multiplying everything in the list by $-1$... – JMoravitz Aug 31 '18 at 19:41
• Just checking: this is not about sorting the list of numbers? – Robert Soupe Sep 1 '18 at 0:22
• no, it is not about sorting. – Stuart Peterson Sep 1 '18 at 7:29

## 1 Answer

(2) will not work. It will leave the numbers in the same order as before. (1) works fine. So will $-x$, or if you want positive numbers $a-x$ where $a$ is larger than the largest of your values, or $-x^3$ or many other things. You just need some decreasing function of $x$ and you are there. Without another criterion nobody can say which is the right way.

• another criterion? such as? – Stuart Peterson Aug 31 '18 at 21:00
• What else you want. I gave a few examples. All will reverse the ordering of the input. How would you choose between them? – Ross Millikan Sep 1 '18 at 0:19