<p>I think, it would be reasonable to use constexpr if the initialization is time-consuming at runtime or if we could evaluate an expression at compile time. But that's not the case here, anyway I think what we could do here is to use <code>static constexpr</code> as we do it with <code>log2pi</code> in <code>gaussian_distribution.hpp</code>.</p>

<pre><code>static const constexpr double log2pi = 1.83787706640934533908193770912475883;
</code></pre>

<p>I'm almost sure the first const is obsolete, I'll need to check that.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">&mdash;<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly or <a href="https://github.com/mlpack/mlpack/pull/612#issuecomment-209086788">view it on GitHub</a><img alt="" height="1" src="https://github.com/notifications/beacon/AJ4bFGxvsFkMu_8-_cSFXIpnfwqpTS5Cks5p2_5TgaJpZM4IFRuV.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
  <link itemprop="url" href="https://github.com/mlpack/mlpack/pull/612#issuecomment-209086788"></link>
  <meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>