">

            <section class="normal" id="section-">

<div>
This is an old version, <a href="https://mc-stan.org/docs/functions-reference/real-valued_basic_functions.html#logical-functions">view current version</a>.
</div>
<div id="logical-functions" class="section level2">
<h2><span class="header-section-number">3.5</span> Logical Functions</h2>
<p>Like C++, BUGS, and R, Stan uses 0 to encode false, and 1 to encode
true. Stan supports the usual boolean comparison operations and
boolean operators. These a