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.
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.
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?"