help with math

ckiick:
It would be much easier to help you if you posted the code, or at least gave some sample inputs and outputs. Otherwise we are just guessing at what the problem is.

One thing is that to preserve accuracy, you need to re-arrange the calculation a little. Also, if you want unsigned long results, you should use unsigned long constants and variables in the calculation as much as possible.

delay = 1000UL * (m * 60UL)) + s) / (passes * 49);

it works! thank a lot!!