<p>I found it may be the bug in Armadillo, since I tried the following codes which is OK:</p>

<pre><code>#include &lt;iostream&gt;
#include &lt;random&gt;

using namespace std;

int main(int argc, const char *argv[])
{
    mt19937_64 rng;
    normal_distribution&lt;double&gt; dist;

    cout &lt;&lt; dist(rng) &lt;&lt; endl;

    return 0;
}
</code></pre>

<p>which should call the same random functions as in <code>arma_rng::randn&lt;double&gt;()</code>.</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, <a href="https://github.com/mlpack/mlpack/issues/718#issuecomment-232333640">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe/AJ4bFIX4aQ4W5FwwXOYrJDjaXvxrxLxPks5qVNJrgaJpZM4JIn4Z">mute the thread</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AJ4bFLsIJlHViDXTxx6xLBtvuRvLl-Nfks5qVNJrgaJpZM4JIn4Z.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/issues/718#issuecomment-232333640"></link>
  <meta itemprop="name" content="View Issue"></meta>
</div>
<meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>