Question:

Floor functions?

We never went trough them but got an assignment that involves it, I'm guessing point of this is to learn to research on your own. And I did but one of the questions is to prove floor(x)+floor(-x). I know it's always -1 unless x =N but how do I prove it?

Answer:

Remember x can describe as integer part y and decimal part .ddddd or y.dddd the floor of y.dddd and -y.dddddd so floor of (y.dddd) is y (the next smaller number ) the floor of (-y.ddddd) = -y - 1 (the next smaller number) so along as .dddd is not zero . for positive x , floor(y.ddddd) = y for negative x, floor(-y.dddd) = -y - 1 so floor(x) + floor(-x) = y + (-y -1) = -1 However , when x is a whole number you have y + (-y) = 0

Share to: