iv>
<div id="type-inference-rules" class="section level3 unnumbered">
<h3>Type inference rules</h3>
<p>Stan’s type inference rules define the implementation type of an
expression based on a background set of variable declarations. The
rules work bottom up from primitive literal and variable expressions
to complex expressions.</p>
</div>
<div id="promotion" class="section level3" number="6.10.1">
<h3><span class="header-section-number">6.10.1</span> Promotion</h3>
<p>There are two basic promotion rules,</p