<p><strong>Update:</strong></p>

<p><strong>Quoting from the standard:</strong></p>

<blockquote>
  <p>If during the evaluation of an expression, the result is not
  mathematically deﬁned or not in the range of representable values for
  its type, <strong>the behavior is undeﬁned</strong>. [ Note: most existing
  implementations of C++ ignore integer overﬂows. Treatment of division
  by zero, forming a remainder using a zero divisor, and all ﬂoating
  point exceptions vary among machines, and is usually adjustable by a
  library function].</p>
</blockquote>

<p><strong>Quoting from</strong> <a href="http://lists.freebsd.org/pipermail/freebsd-numerics/2014-March/000549.html" rel="nofollow noreferrer">http://lists.freebsd.org/pipermail/freebsd-numerics/2014-March/000549.html</a>:</p>

<blockquote>
  <p>It appears that clang developers have chosen the naive complex
  division algorithm.</p>
  
  <p>...</p>
  
  <p>I did a bit of grepping.  Could it be that the division algorithm is
  contained in the file
  src/contrib/llvm/tools/clang/lib/CodeGen/CGExprComplex.cpp inside the
  function ComplexExprEmitter::EmitBinDiv ?</p>
  
  <p>If you look at the code, it certainly looks like it is generating code
  to perform complex division, and it definitely looks like they are
  using the naive algorithm.</p>
</blockquote>

<p>Assuming that indeed the clang uses naive complex division the expression <code>1.0 / c</code> evaluates according to the naive implementation of complex division to the following expression 
<img src="https://i.stack.imgur.com/UVMaK.gif" alt="enter image description here">,</p>

<p><img src="https://i.stack.imgur.com/UHhLq.gif" alt="enter image description here"></p>

<p>1.e-324 is out of the double range. This results according to the standard to <strong>undefined behaviour</strong>.</p>

<p>Also making a search in the <a href="http://llvm.org/bugs/buglist.cgi?query_format=specific&amp;order=relevance%20desc&amp;bug_status=__open__&amp;product=&amp;content=complex%20division" rel="nofollow noreferrer">LLVM/Clang bug list</a>, it appears that there are quite some issues concerning <em>complex division.</em></p>

<p><strong>As such your case is a bug and you should report it.</strong></p>

<p>For anyone who is interested on how robust complex division is implemented take a look at</p>

<ol>
<li><a href="http://ideone.com/bqFk8j" rel="nofollow noreferrer">http://ideone.com/bqFk8j</a> and</li>
<li><a href="http://arxiv.org/abs/1210.4539" rel="nofollow noreferrer">A Robust Complex Division in Scilab.</a></li>
</ol>
Division by complex<double> in clang++ versus g++
<p>When I compile the following code with g++ (4.8.1 or 4.9.0) or clang++ (3.4) I get different outputs.</p>

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

int main() {
  std::complex&lt;double&gt; c = {1.e-162,0};
  std::cout &lt;&lt; 1.0/c &lt;&lt; std::endl;
  return 0;
}
</code></pre>

<p>g++:</p>

<pre><code>(1e+162,0)
</code></pre>

<p>clang++:</p>

<pre><code>(inf,-nan)
</code></pre>

<p>Is this a bug in clang?  </p>

<p>Update:</p>

<p>Thank you for your answers! I reported the bug: <a href="http://llvm.org/bugs/show_bug.cgi?id=19820" rel="nofollow">http://llvm.org/bugs/show_bug.cgi?id=19820</a></p>