Algebra help in Hardy's 'Intro to Number Theory'

Hi

I'm having trouble understanding something in Hardy and Wright's 'An Introduction to the Theory of Numbers'.

The work in question can be viewed here on Google books.

I don't understand the part beginning with 'If we divide 1 by x...'.

As best as I can figure out, we are to divide 1 by x, and then subtract 1 (that is what I think 'taking the largest possible integral quotient' means). Since x is between 1/2 and 1, 1 divided by x must be between (but not including) 1 and 2; so subtracting 1 from 1/x would leave us with just the remainder (a proper fraction) of 1/x. But 1/x - 1 = x, right? But the book says the result is 1 - x = x^2, which is not equal to x.

Any help would be great.

Thanks