Brista, you need to truncate the fraction off at every division step. That is why I noted earlier that this needs to be done using integer calculations.
edit:
whyBish: Thanks for doing some confirmation checks.
edit:
whyBish: Thanks for doing some confirmation checks.