## 06 December 2004

### integer arithmetic

Here is a theorem of McEliece via Knuth that I find very nice. If f is a continuous function with the property that f x is integer implies x is integer then forall real x we have that floor (f x) = floor (f (floor x)). Some consequences are: (a) that (x+m)/n == (int(x)+m)/n (with C++-like notation) and (b) int(log(x)) == int(log(int(x))). The proof is a nice exercise ;)