gle}(y|-1,1) = 1 - |y|.
\]</span>
Consider the following Stan implementation of
<span class="math inline">\(\mathsf{Triangle}(-1,1)\)</span> for sampling.</p>
<pre><code>parameters {
  real&lt;lower=-1,upper=1&gt; y;
}
model {
  target += log1m(fabs(y));
}</code></pre>
<p>The single scalar parameter <code>y</code> is declared as lying in the
interval <code>(-1,1)</code>. The total log probability is
incremented with the joint log probability of all parameters, i.e.,
<span class="math inline">\(\log \mathsf{