Blob Blame Raw
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>SuperLU: SRC/scomplex.c File Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.5 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
</div>
<div class="contents">
<h1>SRC/scomplex.c File Reference</h1>Common arithmetic for <a class="el" href="structcomplex.html">complex</a> type. <a href="#_details">More...</a>
<p>
<code>#include &lt;math.h&gt;</code><br>
<code>#include &lt;stdlib.h&gt;</code><br>
<code>#include &lt;stdio.h&gt;</code><br>
<code>#include &quot;<a class="el" href="slu__scomplex_8h-source.html">slu_scomplex.h</a>&quot;</code><br>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="scomplex_8c.html#19814f5030befb85c4bb07e0fac34a7b">c_div</a> (<a class="el" href="structcomplex.html">complex</a> *c, <a class="el" href="structcomplex.html">complex</a> *a, <a class="el" href="structcomplex.html">complex</a> *b)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Complex Division c = a/b.  <a href="#19814f5030befb85c4bb07e0fac34a7b"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">double&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="scomplex_8c.html#fc2967f7b71477625eb58de94a6e4c71">c_abs</a> (<a class="el" href="structcomplex.html">complex</a> *z)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns sqrt(z.r^2 + z.i^2).  <a href="#fc2967f7b71477625eb58de94a6e4c71"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">double&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="scomplex_8c.html#6a6e9259e2eadc976a783d1b0e8f013b">c_abs1</a> (<a class="el" href="structcomplex.html">complex</a> *z)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Approximates the abs. Returns abs(z.r) + abs(z.i).  <a href="#6a6e9259e2eadc976a783d1b0e8f013b"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="scomplex_8c.html#6111d345ee625a35d42da30db28c6041">c_exp</a> (<a class="el" href="structcomplex.html">complex</a> *r, <a class="el" href="structcomplex.html">complex</a> *z)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return the exponentiation.  <a href="#6111d345ee625a35d42da30db28c6041"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="scomplex_8c.html#dd0e09f7411e03b7516ddedacd6a59df">r_cnjg</a> (<a class="el" href="structcomplex.html">complex</a> *r, <a class="el" href="structcomplex.html">complex</a> *z)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return the <a class="el" href="structcomplex.html">complex</a> conjugate.  <a href="#dd0e09f7411e03b7516ddedacd6a59df"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">double&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="scomplex_8c.html#b6bc19479c8838286f451d5d9a6c86a3">r_imag</a> (<a class="el" href="structcomplex.html">complex</a> *z)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return the imaginary part.  <a href="#b6bc19479c8838286f451d5d9a6c86a3"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="structcomplex.html">complex</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="scomplex_8c.html#ee98d3dfc6ee26d36a2e095bd28414e5">c_sgn</a> (<a class="el" href="structcomplex.html">complex</a> *z)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">SIGN functions for <a class="el" href="structcomplex.html">complex</a> number. Returns z/abs(z).  <a href="#ee98d3dfc6ee26d36a2e095bd28414e5"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="structcomplex.html">complex</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="scomplex_8c.html#8e9b533cd4055cb200a5d63152754898">c_sqrt</a> (<a class="el" href="structcomplex.html">complex</a> *z)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Square-root of a <a class="el" href="structcomplex.html">complex</a> number.  <a href="#8e9b533cd4055cb200a5d63152754898"></a><br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
<pre>
 -- SuperLU routine (version 2.0) --
 Univ. of California Berkeley, Xerox Palo Alto Research Center,
 and Lawrence Berkeley National Lab.
 November 15, 1997</pre><p>
<pre> This file defines common arithmetic operations for <a class="el" href="structcomplex.html">complex</a> type.
 </pre> <hr><h2>Function Documentation</h2>
<a class="anchor" name="fc2967f7b71477625eb58de94a6e4c71"></a><!-- doxytag: member="scomplex.c::c_abs" ref="fc2967f7b71477625eb58de94a6e4c71" args="(complex *z)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">double c_abs           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structcomplex.html">complex</a> *&nbsp;</td>
          <td class="paramname"> <em>z</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>

</div>
</div><p>
<a class="anchor" name="6a6e9259e2eadc976a783d1b0e8f013b"></a><!-- doxytag: member="scomplex.c::c_abs1" ref="6a6e9259e2eadc976a783d1b0e8f013b" args="(complex *z)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">double c_abs1           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structcomplex.html">complex</a> *&nbsp;</td>
          <td class="paramname"> <em>z</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>

</div>
</div><p>
<a class="anchor" name="19814f5030befb85c4bb07e0fac34a7b"></a><!-- doxytag: member="scomplex.c::c_div" ref="19814f5030befb85c4bb07e0fac34a7b" args="(complex *c, complex *a, complex *b)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void c_div           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structcomplex.html">complex</a> *&nbsp;</td>
          <td class="paramname"> <em>c</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structcomplex.html">complex</a> *&nbsp;</td>
          <td class="paramname"> <em>a</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structcomplex.html">complex</a> *&nbsp;</td>
          <td class="paramname"> <em>b</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>

</div>
</div><p>
<a class="anchor" name="6111d345ee625a35d42da30db28c6041"></a><!-- doxytag: member="scomplex.c::c_exp" ref="6111d345ee625a35d42da30db28c6041" args="(complex *r, complex *z)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void c_exp           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structcomplex.html">complex</a> *&nbsp;</td>
          <td class="paramname"> <em>r</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structcomplex.html">complex</a> *&nbsp;</td>
          <td class="paramname"> <em>z</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>

</div>
</div><p>
<a class="anchor" name="ee98d3dfc6ee26d36a2e095bd28414e5"></a><!-- doxytag: member="scomplex.c::c_sgn" ref="ee98d3dfc6ee26d36a2e095bd28414e5" args="(complex *z)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structcomplex.html">complex</a> c_sgn           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structcomplex.html">complex</a> *&nbsp;</td>
          <td class="paramname"> <em>z</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>

</div>
</div><p>
<a class="anchor" name="8e9b533cd4055cb200a5d63152754898"></a><!-- doxytag: member="scomplex.c::c_sqrt" ref="8e9b533cd4055cb200a5d63152754898" args="(complex *z)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structcomplex.html">complex</a> c_sqrt           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structcomplex.html">complex</a> *&nbsp;</td>
          <td class="paramname"> <em>z</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>

</div>
</div><p>
<a class="anchor" name="dd0e09f7411e03b7516ddedacd6a59df"></a><!-- doxytag: member="scomplex.c::r_cnjg" ref="dd0e09f7411e03b7516ddedacd6a59df" args="(complex *r, complex *z)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void r_cnjg           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structcomplex.html">complex</a> *&nbsp;</td>
          <td class="paramname"> <em>r</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structcomplex.html">complex</a> *&nbsp;</td>
          <td class="paramname"> <em>z</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>

</div>
</div><p>
<a class="anchor" name="b6bc19479c8838286f451d5d9a6c86a3"></a><!-- doxytag: member="scomplex.c::r_imag" ref="b6bc19479c8838286f451d5d9a6c86a3" args="(complex *z)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">double r_imag           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structcomplex.html">complex</a> *&nbsp;</td>
          <td class="paramname"> <em>z</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>

</div>
</div><p>
</div>
<hr size="1"><address style="text-align: right;"><small>Generated on Mon Nov 22 10:23:48 2010 for SuperLU by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.5 </small></address>
</body>
</html>