I'm pulling my hair out trying to figure this out:
long a=625; b=(F_CPU * a); c=(F_CPU * a) / 2000000; d=(1410065408L) / 2000000L); e=(long)(((long)(((long)F_CPU) * ((long)625)))) / 2000000L;
a=625 b=1410065408 c=5000 d=705 e=705
I understand that if I don't declare it a long ahead of time, it will wrap. But here, even in the most extreme case, it does something weird! The worst part is, 705 isn't anything special in hex (0x2C1), so I am truly comfuzzled.
Anyone can give a hand and point out the obvious to me?
Edit: Typing in frustration, I CLEARLY didn't give enough information.
c is the only correct answer. F_CPU=16000000, so the problem reduces to 625*8, or in other words 5000.