Hi all,
I need to recover the remainder of a division but no matter what I try the result comes out as 1.
so far I have tried: u8 a = 10 u8 b = 3 u8 r;
r = a % b; r = fmod(a,b) res = div(a,b) r = res.rem;
Casting applied in real code removed for ease of reading. 10/3 = 3.33 clearly what I need is a way to recover the 33 etc, I expect it to be truncated but I didn't expect to get 1 or all remainders.
Compiler is realview Arm, on a STM32 cortex-m3.
Thanks, Dave
Thanks Per,
I think I need a holiday. You are of course correct and I've had a brain malfunction.
Regards, Dave