[Math] How to get the integer part of a number by using basic arithmetic

arithmeticfractional-partfractionsrational numbers

While it is trivial to simply remove the fractional part of an irrational or rational number, and in programming I could just use the floor() or ceil() functions, I was wondering how such calculation is done using basic arithmetic.

In other words, how can I get the integer part of a (base-10) number using merely addition, subtraction, multiplication and division?

Perhaps this is trivial, but after a bit of trying and a bit of googling, I couldn't quite get my head around it. Maybe it is not so trivial after all?

Best Answer

It's impossible.

If you consider the set of all functions $P$ containing $f(x) = x$ and when $f,g \in P$ we have the sum $f(x)+g(x) \in P$, etc. then

Theorem $\text{floor}$ is not contained in $P$.

proof: We prove this by finding a property that everything in $P$ has but $\text{floor}$ does not. All functions in $P$ are continuous, but floor is not.