Equation Gives Unexpected Result

Ok im not exactly sure where to post this as i am really bad with math lol(Giggle)

ok to all you geniuses(Nerd)

This Equation Works fine:

**0+79*0/(0+1)+293*0/(1+0-(0/62)*62)+479**

as it equals **479**

This also works fine:

**0+79*0/(61+1)+293*(61/1+0-(0/62)*62)+479**

as it equals **3352**

Unfortunately this gives unexpected results:

**479+79*479/(1+1)+293*1/(1+479-(479/62)*62)+479** = **20171.5**

**20171.5** Should Be:** 19884**

----

To people who want to know the above equations are actually from a PHP Script. I am trying to convert a JASS script to PHP and im hoping this is the last thing to solve :P.

Thanks for all your help :D