Floor of x+m over n/Corollary
Jump to navigation
Jump to search
Corollary to Floor of $\frac {x + m} n$
Let $n \in \Z$ such that $n > 0$.
Let $x \in \R$.
Then:
- $\floor {\dfrac x n} = \floor {\dfrac {\floor x} n}$
where $\floor x$ denotes the floor of $x$.
Proof
This is a special case of Floor of $\dfrac {x + m} n$:
- $\floor {\dfrac {x + m} n} = \floor {\dfrac {\floor x + m} n}$
where $m = 0$.
$\blacksquare$
Sources
- 1997: Donald E. Knuth: The Art of Computer Programming: Volume 1: Fundamental Algorithms (3rd ed.) ... (previous) ... (next): $\S 1.2.4$: Integer Functions and Elementary Number Theory: Exercise $35$