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$.
With mwt's help, I just figured it out.
Okay so let's express $t$ as $ks+n$ for some $k\in\mathbb Z$
$t-s\lfloor \frac{t}{s} \rfloor = ks+n-s\lfloor \frac{ks+n}{s} \rfloor = n-s\lfloor \frac{n}{s} \rfloor$
However $n \in [0;s[$, so :
$n-s\lfloor \frac{n}{s} \rfloor=n$