Hi Romain,
the result of your code is correct. The "problem" is implicit conversion. While the division is executed, the priority of data type is applied (because data types are different) and because signed int has the lowest priority, both operands are implicitly converted to unsigned int according to s32B variable.
Now look, how the computation looks like:
s32A is converted to 42 949 672 266 (max range of unsigned 32-bit int minus 30......2^32 - 30)
s32B is still 30
s32Result = 42 949 672 266 / 30 = 143 165 575,53 (fractional part is removed from result, because the variable is int)
and this is the result you got.
So the solution is to use the same data types, or use explicit conversion during the division, for example:
s32Result = s32A / (signed int)u32B;
Regards,
Martin