# removing the remainder of a fraction

I would like to remove the remainder from a fraction if possible. I want a function

$$f(x,y) = x/y - remainder$$

for example

$$f(3,2) = 1$$ $$f(7,2) = 3$$ $$f(12,5) = 2$$

It seems so simple but its been bugging me for a while. Please help.

-
What properties do you want this remainder to have? Do you want it to be an integer? Because it seems to me like you're looking at standard integer division. –  Patrick Da Silva Jun 14 '13 at 12:32
Do you mean something like en.wikipedia.org/wiki/Floor_and_ceiling_functions? –  Amzoti Jun 14 '13 at 12:33
x and y are both integers. The output of f(x,y) is also an integer. Yes I need something like a floor function but I want it from first principles if possible –  Manatok Jun 14 '13 at 12:37
You are looking for division with remainder We have $y=\lfloor \frac yx \rfloor x+r$, where $f(x,y)=\lfloor \frac yx \rfloor, r=y-\lfloor \frac yx \rfloor x$. What do you mean by "from first principles?"