[TIB] Re: remainders
[Prev][Next][Index][Thread]
[TIB] Re: remainders
I don't know if this command works on anything other than the TI86 but
you could simplify what Damian said using the fpart command:
(fpart (number / divisor))divisor
i.e.
(fpart (10/3)) 3
Damian Manda wrote:
>Christopher,
>
>To calculate a remainder use this equation:
>
>Number - (Divisor * ipart(Number / Divisor))
>
>For example, to calculate the remainder of 10/3 you would use 10-(3 * 3)
>which equals 1, the remainder for that equation.
>The ten is the number you are dividing, the first three is the number
>you are dividing the 10 by, and the final 3 is the integer part of the
>result of 10/3 (3.333).
>
> -Damian Manda
> http://home.attbi.com/~damian
> http://www.kingsofchaos.com/page.php?id=772125
>
>
>
>
>
>
References: