I'd like to know why when $t\equiv n\pmod s$, $n$ is also $t - s\lfloor \frac{t}{s}\rfloor$?
Here, $n\in[0;s[$
I can't find a way to prove $n$.
Thank you for your help!
I'd like to know why when $t\equiv n\pmod s$, $n$ is also $t - s\lfloor \frac{t}{s}\rfloor$?
Here, $n\in[0;s[$
I can't find a way to prove $n$.
Thank you for your help!
$n$ is the remainder when $t$ is divided by $s$, which you can write as $t = n+sq$.
Since the quotient, $q$, is the integer part of the result of the division, $q = \left\lfloor\frac{t}{s}\right\rfloor$.
Substitute that in and do a basic transposition, and you get $n = t-s\left\lfloor\frac{t}{s}\right\rfloor$.