$\bmod\!$ operator precedence: does $\,a\bmod b+c\,$ mean $\,(a\bmod b)+c\ $ or $\ a\bmod (b+c)\,$?
Solution 1:
As you have already seen, there is not a universal convention, so write parentheses to indicate what you mean. mod
is not a "standard enough" operation to have a universally agreed convention.