ntations. The maximum value that can be represented
as an integer is <span class="math inline">\(2^{31}-1\)</span>; the minimum value is <span class="math inline">\(-(2^{31})\)</span>.</p>
<p>When integers overflow, their values wrap. Thus it is up to the Stan
programmer to make sure the integer values in their programs stay in
range. In particular, every intermediate expression must have an
integer value that is in range.</p>
<p>Integer arithmetic works in the expected way for addition,
subtraction, and mu