News for hackers. Stuff that matters.
Re:Mathematics Cheat Sheet [pdf] by danbruc on Friday June 11, 2021 @04:44AM (#27470798)
What is this useful for, page 45?

Rational Numbers: Every rational number can be written as r = [(r - 1) + (r + 1)] / 2

I would have expected p / q with p and q integers or some variation of this.

Re:Mathematics Cheat Sheet [pdf] by gspr on Friday June 11, 2021 @04:48AM (#27470818)
That is indeed strange. And why restrict it to rationals, when it's true for every real (or every complex, whatever)? It's even true for integers, under a suitable interpretation of what is meant by dividing by 2 in that case.
Re:Mathematics Cheat Sheet [pdf] by bidirectional on Friday June 11, 2021 @05:23AM (#27471015)
It's also totally trivial when you rewrite it slightly: (r + r + 1 - 1) / 2. So basically adding r to itself to get 2r then dividing by 2 gives you back r, with a pointless plus and minus 1 thrown in.
Re:Mathematics Cheat Sheet [pdf] by nabla9 on Friday June 11, 2021 @08:34AM (#27472434)
It's trivial only if you are simplifying mathematical expression.

When you have to go the opposite direction, you start with r and must turn it something that fits some other expression, there are infinite ways to proceed. Right ones rarely just pop up into your mind.

Remembering trivial identities things like that are useful as small intermediate steps when manipulating expressions.

Re:Mathematics Cheat Sheet [pdf] by danbruc on Friday June 11, 2021 @09:24AM (#27472977)
But this still does not answer why this expression is specifically listed for rational numbers as it is true for subsets of the rational numbers like the integers as well as for supersets of the rational numbers like the real numbers.