<div class="gmail_quote">On Mon, Sep 17, 2012 at 8:27 PM, Barry Smith <span dir="ltr"><<a href="mailto:bsmith@mcs.anl.gov" target="_blank">bsmith@mcs.anl.gov</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
So it is ok to do  if (fl == 0.0)   but not (!fl)?  How are they different?</blockquote><div><br></div><div>It means the wrong thing in C++. Specifically, it tries to convert the number to bool since there is no std::complex<T>::operator!(T), but std::complex does not provide a conversion to bool either. This produces errors like</div>
</div><div><br>error: invalid argument type 'std::complex<double>' to unary expression</div>