<p>Hey Li,</p>

<p>Thanks for the report.  I wonder if it needs to be <code>if (std::isnan(cNorm) || std::isinf(cNorm))</code>.  Is this on Cygwin or something like this?  I haven't encountered this on any of the Linux machines I use.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">&mdash;<br>Reply to this email directly or <a href="https://github.com/mlpack/mlpack/issues/522#issuecomment-184982416">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AJ4bFHswSC4O53rNdO8wUW5y0voPMyTeks5pk9MsgaJpZM4Hbv9r.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/522#issuecomment-184982416"></link>
  <meta itemprop="name" content="View Issue"></meta>
</div>
<meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>