commons-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From l..@apache.org
Subject svn commit: r948065 [3/16] - in /websites/production/commons/content/proper/commons-math/xref-test: ./ org/apache/commons/math3/ org/apache/commons/math3/analysis/ org/apache/commons/math3/analysis/differentiation/ org/apache/commons/math3/analysis/fun...
Date Fri, 17 Apr 2015 19:49:15 GMT
Modified: websites/production/commons/content/proper/commons-math/xref-test/org/apache/commons/math3/complex/ComplexTest.html
==============================================================================
--- websites/production/commons/content/proper/commons-math/xref-test/org/apache/commons/math3/complex/ComplexTest.html (original)
+++ websites/production/commons/content/proper/commons-math/xref-test/org/apache/commons/math3/complex/ComplexTest.html Fri Apr 17 19:49:06 2015
@@ -25,13 +25,13 @@
 <a class="jxr_linenumber" name="L17" href="#L17">17</a>  
 <a class="jxr_linenumber" name="L18" href="#L18">18</a>  <strong class="jxr_keyword">package</strong> org.apache.commons.math3.complex;
 <a class="jxr_linenumber" name="L19" href="#L19">19</a>  
-<a class="jxr_linenumber" name="L20" href="#L20">20</a>  <strong class="jxr_keyword">import</strong> org.apache.commons.math3.TestUtils;
-<a class="jxr_linenumber" name="L21" href="#L21">21</a>  <strong class="jxr_keyword">import</strong> org.apache.commons.math3.exception.NullArgumentException;
-<a class="jxr_linenumber" name="L22" href="#L22">22</a>  <strong class="jxr_keyword">import</strong> org.apache.commons.math3.util.FastMath;
-<a class="jxr_linenumber" name="L23" href="#L23">23</a>  <strong class="jxr_keyword">import</strong> org.junit.Assert;
-<a class="jxr_linenumber" name="L24" href="#L24">24</a>  <strong class="jxr_keyword">import</strong> org.junit.Test;
-<a class="jxr_linenumber" name="L25" href="#L25">25</a>  
-<a class="jxr_linenumber" name="L26" href="#L26">26</a>  <strong class="jxr_keyword">import</strong> java.util.List;
+<a class="jxr_linenumber" name="L20" href="#L20">20</a>  <strong class="jxr_keyword">import</strong> java.util.List;
+<a class="jxr_linenumber" name="L21" href="#L21">21</a>  
+<a class="jxr_linenumber" name="L22" href="#L22">22</a>  <strong class="jxr_keyword">import</strong> org.apache.commons.math3.TestUtils;
+<a class="jxr_linenumber" name="L23" href="#L23">23</a>  <strong class="jxr_keyword">import</strong> org.apache.commons.math3.exception.NullArgumentException;
+<a class="jxr_linenumber" name="L24" href="#L24">24</a>  <strong class="jxr_keyword">import</strong> org.apache.commons.math3.util.FastMath;
+<a class="jxr_linenumber" name="L25" href="#L25">25</a>  <strong class="jxr_keyword">import</strong> org.junit.Assert;
+<a class="jxr_linenumber" name="L26" href="#L26">26</a>  <strong class="jxr_keyword">import</strong> org.junit.Test;
 <a class="jxr_linenumber" name="L27" href="#L27">27</a>  
 <a class="jxr_linenumber" name="L28" href="#L28">28</a>  
 <a class="jxr_linenumber" name="L29" href="#L29">29</a>  <em class="jxr_javadoccomment">/**</em>
@@ -789,636 +789,705 @@
 <a class="jxr_linenumber" name="L781" href="#L781">781</a>     }
 <a class="jxr_linenumber" name="L782" href="#L782">782</a> 
 <a class="jxr_linenumber" name="L783" href="#L783">783</a>     @Test
-<a class="jxr_linenumber" name="L784" href="#L784">784</a>     <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> testExpInf() {
+<a class="jxr_linenumber" name="L784" href="#L784">784</a>     <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> testExpInf1() {
 <a class="jxr_linenumber" name="L785" href="#L785">785</a>         TestUtils.assertSame(Complex.NaN, oneInf.exp());
-<a class="jxr_linenumber" name="L786" href="#L786">786</a>         TestUtils.assertSame(Complex.NaN, oneNegInf.exp());
-<a class="jxr_linenumber" name="L787" href="#L787">787</a>         TestUtils.assertSame(infInf, infOne.exp());
-<a class="jxr_linenumber" name="L788" href="#L788">788</a>         TestUtils.assertSame(Complex.ZERO, negInfOne.exp());
-<a class="jxr_linenumber" name="L789" href="#L789">789</a>         TestUtils.assertSame(Complex.NaN, infInf.exp());
-<a class="jxr_linenumber" name="L790" href="#L790">790</a>         TestUtils.assertSame(Complex.NaN, infNegInf.exp());
-<a class="jxr_linenumber" name="L791" href="#L791">791</a>         TestUtils.assertSame(Complex.NaN, negInfInf.exp());
-<a class="jxr_linenumber" name="L792" href="#L792">792</a>         TestUtils.assertSame(Complex.NaN, negInfNegInf.exp());
-<a class="jxr_linenumber" name="L793" href="#L793">793</a>     }
-<a class="jxr_linenumber" name="L794" href="#L794">794</a> 
-<a class="jxr_linenumber" name="L795" href="#L795">795</a>     @Test
-<a class="jxr_linenumber" name="L796" href="#L796">796</a>     <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> testLog() {
-<a class="jxr_linenumber" name="L797" href="#L797">797</a>         Complex z = <strong class="jxr_keyword">new</strong> Complex(3, 4);
-<a class="jxr_linenumber" name="L798" href="#L798">798</a>         Complex expected = <strong class="jxr_keyword">new</strong> Complex(1.60944, 0.927295);
-<a class="jxr_linenumber" name="L799" href="#L799">799</a>         TestUtils.assertEquals(expected, z.log(), 1.0e-5);
-<a class="jxr_linenumber" name="L800" href="#L800">800</a>     }
-<a class="jxr_linenumber" name="L801" href="#L801">801</a> 
-<a class="jxr_linenumber" name="L802" href="#L802">802</a>     @Test
-<a class="jxr_linenumber" name="L803" href="#L803">803</a>     <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> testLogNaN() {
-<a class="jxr_linenumber" name="L804" href="#L804">804</a>         Assert.assertTrue(Complex.NaN.log().isNaN());
-<a class="jxr_linenumber" name="L805" href="#L805">805</a>     }
-<a class="jxr_linenumber" name="L806" href="#L806">806</a> 
-<a class="jxr_linenumber" name="L807" href="#L807">807</a>     @Test
-<a class="jxr_linenumber" name="L808" href="#L808">808</a>     <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> testLogInf() {
-<a class="jxr_linenumber" name="L809" href="#L809">809</a>         TestUtils.assertEquals(<strong class="jxr_keyword">new</strong> Complex(inf, pi / 2),
-<a class="jxr_linenumber" name="L810" href="#L810">810</a>                 oneInf.log(), 10e-12);
-<a class="jxr_linenumber" name="L811" href="#L811">811</a>         TestUtils.assertEquals(<strong class="jxr_keyword">new</strong> Complex(inf, -pi / 2),
-<a class="jxr_linenumber" name="L812" href="#L812">812</a>                 oneNegInf.log(), 10e-12);
-<a class="jxr_linenumber" name="L813" href="#L813">813</a>         TestUtils.assertEquals(infZero, infOne.log(), 10e-12);
-<a class="jxr_linenumber" name="L814" href="#L814">814</a>         TestUtils.assertEquals(<strong class="jxr_keyword">new</strong> Complex(inf, pi),
-<a class="jxr_linenumber" name="L815" href="#L815">815</a>                 negInfOne.log(), 10e-12);
-<a class="jxr_linenumber" name="L816" href="#L816">816</a>         TestUtils.assertEquals(<strong class="jxr_keyword">new</strong> Complex(inf, pi / 4),
-<a class="jxr_linenumber" name="L817" href="#L817">817</a>                 infInf.log(), 10e-12);
-<a class="jxr_linenumber" name="L818" href="#L818">818</a>         TestUtils.assertEquals(<strong class="jxr_keyword">new</strong> Complex(inf, -pi / 4),
-<a class="jxr_linenumber" name="L819" href="#L819">819</a>                 infNegInf.log(), 10e-12);
-<a class="jxr_linenumber" name="L820" href="#L820">820</a>         TestUtils.assertEquals(<strong class="jxr_keyword">new</strong> Complex(inf, 3d * pi / 4),
-<a class="jxr_linenumber" name="L821" href="#L821">821</a>                 negInfInf.log(), 10e-12);
-<a class="jxr_linenumber" name="L822" href="#L822">822</a>         TestUtils.assertEquals(<strong class="jxr_keyword">new</strong> Complex(inf, - 3d * pi / 4),
-<a class="jxr_linenumber" name="L823" href="#L823">823</a>                 negInfNegInf.log(), 10e-12);
-<a class="jxr_linenumber" name="L824" href="#L824">824</a>     }
-<a class="jxr_linenumber" name="L825" href="#L825">825</a> 
-<a class="jxr_linenumber" name="L826" href="#L826">826</a>     @Test
-<a class="jxr_linenumber" name="L827" href="#L827">827</a>     <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> testLogZero() {
-<a class="jxr_linenumber" name="L828" href="#L828">828</a>         TestUtils.assertSame(negInfZero, Complex.ZERO.log());
-<a class="jxr_linenumber" name="L829" href="#L829">829</a>     }
-<a class="jxr_linenumber" name="L830" href="#L830">830</a> 
-<a class="jxr_linenumber" name="L831" href="#L831">831</a>     @Test
-<a class="jxr_linenumber" name="L832" href="#L832">832</a>     <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> testPow() {
-<a class="jxr_linenumber" name="L833" href="#L833">833</a>         Complex x = <strong class="jxr_keyword">new</strong> Complex(3, 4);
-<a class="jxr_linenumber" name="L834" href="#L834">834</a>         Complex y = <strong class="jxr_keyword">new</strong> Complex(5, 6);
-<a class="jxr_linenumber" name="L835" href="#L835">835</a>         Complex expected = <strong class="jxr_keyword">new</strong> Complex(-1.860893, 11.83677);
-<a class="jxr_linenumber" name="L836" href="#L836">836</a>         TestUtils.assertEquals(expected, x.pow(y), 1.0e-5);
-<a class="jxr_linenumber" name="L837" href="#L837">837</a>     }
-<a class="jxr_linenumber" name="L838" href="#L838">838</a> 
-<a class="jxr_linenumber" name="L839" href="#L839">839</a>     @Test
-<a class="jxr_linenumber" name="L840" href="#L840">840</a>     <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> testPowNaNBase() {
-<a class="jxr_linenumber" name="L841" href="#L841">841</a>         Complex x = <strong class="jxr_keyword">new</strong> Complex(3, 4);
-<a class="jxr_linenumber" name="L842" href="#L842">842</a>         Assert.assertTrue(Complex.NaN.pow(x).isNaN());
-<a class="jxr_linenumber" name="L843" href="#L843">843</a>     }
-<a class="jxr_linenumber" name="L844" href="#L844">844</a> 
-<a class="jxr_linenumber" name="L845" href="#L845">845</a>     @Test
-<a class="jxr_linenumber" name="L846" href="#L846">846</a>     <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> testPowNaNExponent() {
-<a class="jxr_linenumber" name="L847" href="#L847">847</a>         Complex x = <strong class="jxr_keyword">new</strong> Complex(3, 4);
-<a class="jxr_linenumber" name="L848" href="#L848">848</a>         Assert.assertTrue(x.pow(Complex.NaN).isNaN());
-<a class="jxr_linenumber" name="L849" href="#L849">849</a>     }
-<a class="jxr_linenumber" name="L850" href="#L850">850</a> 
-<a class="jxr_linenumber" name="L851" href="#L851">851</a>    @Test
-<a class="jxr_linenumber" name="L852" href="#L852">852</a>    <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> testPowInf() {
-<a class="jxr_linenumber" name="L853" href="#L853">853</a>        TestUtils.assertSame(Complex.NaN,Complex.ONE.pow(oneInf));
-<a class="jxr_linenumber" name="L854" href="#L854">854</a>        TestUtils.assertSame(Complex.NaN,Complex.ONE.pow(oneNegInf));
-<a class="jxr_linenumber" name="L855" href="#L855">855</a>        TestUtils.assertSame(Complex.NaN,Complex.ONE.pow(infOne));
-<a class="jxr_linenumber" name="L856" href="#L856">856</a>        TestUtils.assertSame(Complex.NaN,Complex.ONE.pow(infInf));
-<a class="jxr_linenumber" name="L857" href="#L857">857</a>        TestUtils.assertSame(Complex.NaN,Complex.ONE.pow(infNegInf));
-<a class="jxr_linenumber" name="L858" href="#L858">858</a>        TestUtils.assertSame(Complex.NaN,Complex.ONE.pow(negInfInf));
-<a class="jxr_linenumber" name="L859" href="#L859">859</a>        TestUtils.assertSame(Complex.NaN,Complex.ONE.pow(negInfNegInf));
-<a class="jxr_linenumber" name="L860" href="#L860">860</a>        TestUtils.assertSame(Complex.NaN,infOne.pow(Complex.ONE));
-<a class="jxr_linenumber" name="L861" href="#L861">861</a>        TestUtils.assertSame(Complex.NaN,negInfOne.pow(Complex.ONE));
-<a class="jxr_linenumber" name="L862" href="#L862">862</a>        TestUtils.assertSame(Complex.NaN,infInf.pow(Complex.ONE));
-<a class="jxr_linenumber" name="L863" href="#L863">863</a>        TestUtils.assertSame(Complex.NaN,infNegInf.pow(Complex.ONE));
-<a class="jxr_linenumber" name="L864" href="#L864">864</a>        TestUtils.assertSame(Complex.NaN,negInfInf.pow(Complex.ONE));
-<a class="jxr_linenumber" name="L865" href="#L865">865</a>        TestUtils.assertSame(Complex.NaN,negInfNegInf.pow(Complex.ONE));
-<a class="jxr_linenumber" name="L866" href="#L866">866</a>        TestUtils.assertSame(Complex.NaN,negInfNegInf.pow(infNegInf));
-<a class="jxr_linenumber" name="L867" href="#L867">867</a>        TestUtils.assertSame(Complex.NaN,negInfNegInf.pow(negInfNegInf));
-<a class="jxr_linenumber" name="L868" href="#L868">868</a>        TestUtils.assertSame(Complex.NaN,negInfNegInf.pow(infInf));
-<a class="jxr_linenumber" name="L869" href="#L869">869</a>        TestUtils.assertSame(Complex.NaN,infInf.pow(infNegInf));
-<a class="jxr_linenumber" name="L870" href="#L870">870</a>        TestUtils.assertSame(Complex.NaN,infInf.pow(negInfNegInf));
-<a class="jxr_linenumber" name="L871" href="#L871">871</a>        TestUtils.assertSame(Complex.NaN,infInf.pow(infInf));
-<a class="jxr_linenumber" name="L872" href="#L872">872</a>        TestUtils.assertSame(Complex.NaN,infNegInf.pow(infNegInf));
-<a class="jxr_linenumber" name="L873" href="#L873">873</a>        TestUtils.assertSame(Complex.NaN,infNegInf.pow(negInfNegInf));
-<a class="jxr_linenumber" name="L874" href="#L874">874</a>        TestUtils.assertSame(Complex.NaN,infNegInf.pow(infInf));
-<a class="jxr_linenumber" name="L875" href="#L875">875</a>    }
-<a class="jxr_linenumber" name="L876" href="#L876">876</a> 
-<a class="jxr_linenumber" name="L877" href="#L877">877</a>    @Test
-<a class="jxr_linenumber" name="L878" href="#L878">878</a>    <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> testPowZero() {
-<a class="jxr_linenumber" name="L879" href="#L879">879</a>        TestUtils.assertSame(Complex.NaN,
-<a class="jxr_linenumber" name="L880" href="#L880">880</a>                Complex.ZERO.pow(Complex.ONE));
-<a class="jxr_linenumber" name="L881" href="#L881">881</a>        TestUtils.assertSame(Complex.NaN,
-<a class="jxr_linenumber" name="L882" href="#L882">882</a>                Complex.ZERO.pow(Complex.ZERO));
-<a class="jxr_linenumber" name="L883" href="#L883">883</a>        TestUtils.assertSame(Complex.NaN,
-<a class="jxr_linenumber" name="L884" href="#L884">884</a>                Complex.ZERO.pow(Complex.I));
-<a class="jxr_linenumber" name="L885" href="#L885">885</a>        TestUtils.assertEquals(Complex.ONE,
-<a class="jxr_linenumber" name="L886" href="#L886">886</a>                Complex.ONE.pow(Complex.ZERO), 10e-12);
-<a class="jxr_linenumber" name="L887" href="#L887">887</a>        TestUtils.assertEquals(Complex.ONE,
-<a class="jxr_linenumber" name="L888" href="#L888">888</a>                Complex.I.pow(Complex.ZERO), 10e-12);
-<a class="jxr_linenumber" name="L889" href="#L889">889</a>        TestUtils.assertEquals(Complex.ONE,
-<a class="jxr_linenumber" name="L890" href="#L890">890</a>                <strong class="jxr_keyword">new</strong> Complex(-1, 3).pow(Complex.ZERO), 10e-12);
-<a class="jxr_linenumber" name="L891" href="#L891">891</a>    }
-<a class="jxr_linenumber" name="L892" href="#L892">892</a> 
-<a class="jxr_linenumber" name="L893" href="#L893">893</a>     @Test
-<a class="jxr_linenumber" name="L894" href="#L894">894</a>     <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> testScalarPow() {
-<a class="jxr_linenumber" name="L895" href="#L895">895</a>         Complex x = <strong class="jxr_keyword">new</strong> Complex(3, 4);
-<a class="jxr_linenumber" name="L896" href="#L896">896</a>         <strong class="jxr_keyword">double</strong> yDouble = 5.0;
-<a class="jxr_linenumber" name="L897" href="#L897">897</a>         Complex yComplex = <strong class="jxr_keyword">new</strong> Complex(yDouble);
-<a class="jxr_linenumber" name="L898" href="#L898">898</a>         Assert.assertEquals(x.pow(yComplex), x.pow(yDouble));
-<a class="jxr_linenumber" name="L899" href="#L899">899</a>     }
-<a class="jxr_linenumber" name="L900" href="#L900">900</a> 
-<a class="jxr_linenumber" name="L901" href="#L901">901</a>     @Test
-<a class="jxr_linenumber" name="L902" href="#L902">902</a>     <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> testScalarPowNaNBase() {
-<a class="jxr_linenumber" name="L903" href="#L903">903</a>         Complex x = Complex.NaN;
-<a class="jxr_linenumber" name="L904" href="#L904">904</a>         <strong class="jxr_keyword">double</strong> yDouble = 5.0;
-<a class="jxr_linenumber" name="L905" href="#L905">905</a>         Complex yComplex = <strong class="jxr_keyword">new</strong> Complex(yDouble);
-<a class="jxr_linenumber" name="L906" href="#L906">906</a>         Assert.assertEquals(x.pow(yComplex), x.pow(yDouble));
-<a class="jxr_linenumber" name="L907" href="#L907">907</a>     }
-<a class="jxr_linenumber" name="L908" href="#L908">908</a> 
-<a class="jxr_linenumber" name="L909" href="#L909">909</a>     @Test
-<a class="jxr_linenumber" name="L910" href="#L910">910</a>     <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> testScalarPowNaNExponent() {
-<a class="jxr_linenumber" name="L911" href="#L911">911</a>         Complex x = <strong class="jxr_keyword">new</strong> Complex(3, 4);
-<a class="jxr_linenumber" name="L912" href="#L912">912</a>         <strong class="jxr_keyword">double</strong> yDouble = Double.NaN;
-<a class="jxr_linenumber" name="L913" href="#L913">913</a>         Complex yComplex = <strong class="jxr_keyword">new</strong> Complex(yDouble);
-<a class="jxr_linenumber" name="L914" href="#L914">914</a>         Assert.assertEquals(x.pow(yComplex), x.pow(yDouble));
-<a class="jxr_linenumber" name="L915" href="#L915">915</a>     }
-<a class="jxr_linenumber" name="L916" href="#L916">916</a> 
-<a class="jxr_linenumber" name="L917" href="#L917">917</a>    @Test
-<a class="jxr_linenumber" name="L918" href="#L918">918</a>    <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> testScalarPowInf() {
-<a class="jxr_linenumber" name="L919" href="#L919">919</a>        TestUtils.assertSame(Complex.NaN,Complex.ONE.pow(Double.POSITIVE_INFINITY));
-<a class="jxr_linenumber" name="L920" href="#L920">920</a>        TestUtils.assertSame(Complex.NaN,Complex.ONE.pow(Double.NEGATIVE_INFINITY));
-<a class="jxr_linenumber" name="L921" href="#L921">921</a>        TestUtils.assertSame(Complex.NaN,infOne.pow(1.0));
-<a class="jxr_linenumber" name="L922" href="#L922">922</a>        TestUtils.assertSame(Complex.NaN,negInfOne.pow(1.0));
-<a class="jxr_linenumber" name="L923" href="#L923">923</a>        TestUtils.assertSame(Complex.NaN,infInf.pow(1.0));
-<a class="jxr_linenumber" name="L924" href="#L924">924</a>        TestUtils.assertSame(Complex.NaN,infNegInf.pow(1.0));
-<a class="jxr_linenumber" name="L925" href="#L925">925</a>        TestUtils.assertSame(Complex.NaN,negInfInf.pow(10));
-<a class="jxr_linenumber" name="L926" href="#L926">926</a>        TestUtils.assertSame(Complex.NaN,negInfNegInf.pow(1.0));
-<a class="jxr_linenumber" name="L927" href="#L927">927</a>        TestUtils.assertSame(Complex.NaN,negInfNegInf.pow(Double.POSITIVE_INFINITY));
-<a class="jxr_linenumber" name="L928" href="#L928">928</a>        TestUtils.assertSame(Complex.NaN,negInfNegInf.pow(Double.POSITIVE_INFINITY));
-<a class="jxr_linenumber" name="L929" href="#L929">929</a>        TestUtils.assertSame(Complex.NaN,infInf.pow(Double.POSITIVE_INFINITY));
-<a class="jxr_linenumber" name="L930" href="#L930">930</a>        TestUtils.assertSame(Complex.NaN,infInf.pow(Double.NEGATIVE_INFINITY));
-<a class="jxr_linenumber" name="L931" href="#L931">931</a>        TestUtils.assertSame(Complex.NaN,infNegInf.pow(Double.NEGATIVE_INFINITY));
-<a class="jxr_linenumber" name="L932" href="#L932">932</a>        TestUtils.assertSame(Complex.NaN,infNegInf.pow(Double.POSITIVE_INFINITY));
-<a class="jxr_linenumber" name="L933" href="#L933">933</a>    }
-<a class="jxr_linenumber" name="L934" href="#L934">934</a> 
-<a class="jxr_linenumber" name="L935" href="#L935">935</a>    @Test
-<a class="jxr_linenumber" name="L936" href="#L936">936</a>    <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> testScalarPowZero() {
-<a class="jxr_linenumber" name="L937" href="#L937">937</a>        TestUtils.assertSame(Complex.NaN, Complex.ZERO.pow(1.0));
-<a class="jxr_linenumber" name="L938" href="#L938">938</a>        TestUtils.assertSame(Complex.NaN, Complex.ZERO.pow(0.0));
-<a class="jxr_linenumber" name="L939" href="#L939">939</a>        TestUtils.assertEquals(Complex.ONE, Complex.ONE.pow(0.0), 10e-12);
-<a class="jxr_linenumber" name="L940" href="#L940">940</a>        TestUtils.assertEquals(Complex.ONE, Complex.I.pow(0.0), 10e-12);
-<a class="jxr_linenumber" name="L941" href="#L941">941</a>        TestUtils.assertEquals(Complex.ONE, <strong class="jxr_keyword">new</strong> Complex(-1, 3).pow(0.0), 10e-12);
-<a class="jxr_linenumber" name="L942" href="#L942">942</a>    }
-<a class="jxr_linenumber" name="L943" href="#L943">943</a> 
-<a class="jxr_linenumber" name="L944" href="#L944">944</a>     @Test(expected=NullArgumentException.<strong class="jxr_keyword">class</strong>)
-<a class="jxr_linenumber" name="L945" href="#L945">945</a>     <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> testpowNull() {
-<a class="jxr_linenumber" name="L946" href="#L946">946</a>         Complex.ONE.pow(<strong class="jxr_keyword">null</strong>);
-<a class="jxr_linenumber" name="L947" href="#L947">947</a>     }
-<a class="jxr_linenumber" name="L948" href="#L948">948</a> 
-<a class="jxr_linenumber" name="L949" href="#L949">949</a>     @Test
-<a class="jxr_linenumber" name="L950" href="#L950">950</a>     <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> testSin() {
-<a class="jxr_linenumber" name="L951" href="#L951">951</a>         Complex z = <strong class="jxr_keyword">new</strong> Complex(3, 4);
-<a class="jxr_linenumber" name="L952" href="#L952">952</a>         Complex expected = <strong class="jxr_keyword">new</strong> Complex(3.853738, -27.01681);
-<a class="jxr_linenumber" name="L953" href="#L953">953</a>         TestUtils.assertEquals(expected, z.sin(), 1.0e-5);
-<a class="jxr_linenumber" name="L954" href="#L954">954</a>     }
-<a class="jxr_linenumber" name="L955" href="#L955">955</a> 
-<a class="jxr_linenumber" name="L956" href="#L956">956</a>     @Test
-<a class="jxr_linenumber" name="L957" href="#L957">957</a>     <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> testSinInf() {
-<a class="jxr_linenumber" name="L958" href="#L958">958</a>         TestUtils.assertSame(infInf, oneInf.sin());
-<a class="jxr_linenumber" name="L959" href="#L959">959</a>         TestUtils.assertSame(infNegInf, oneNegInf.sin());
-<a class="jxr_linenumber" name="L960" href="#L960">960</a>         TestUtils.assertSame(Complex.NaN, infOne.sin());
-<a class="jxr_linenumber" name="L961" href="#L961">961</a>         TestUtils.assertSame(Complex.NaN, negInfOne.sin());
-<a class="jxr_linenumber" name="L962" href="#L962">962</a>         TestUtils.assertSame(Complex.NaN, infInf.sin());
-<a class="jxr_linenumber" name="L963" href="#L963">963</a>         TestUtils.assertSame(Complex.NaN, infNegInf.sin());
-<a class="jxr_linenumber" name="L964" href="#L964">964</a>         TestUtils.assertSame(Complex.NaN, negInfInf.sin());
-<a class="jxr_linenumber" name="L965" href="#L965">965</a>         TestUtils.assertSame(Complex.NaN, negInfNegInf.sin());
-<a class="jxr_linenumber" name="L966" href="#L966">966</a>     }
-<a class="jxr_linenumber" name="L967" href="#L967">967</a> 
-<a class="jxr_linenumber" name="L968" href="#L968">968</a>     @Test
-<a class="jxr_linenumber" name="L969" href="#L969">969</a>     <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> testSinNaN() {
-<a class="jxr_linenumber" name="L970" href="#L970">970</a>         Assert.assertTrue(Complex.NaN.sin().isNaN());
-<a class="jxr_linenumber" name="L971" href="#L971">971</a>     }
-<a class="jxr_linenumber" name="L972" href="#L972">972</a> 
-<a class="jxr_linenumber" name="L973" href="#L973">973</a>     @Test
-<a class="jxr_linenumber" name="L974" href="#L974">974</a>     <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> testSinh() {
-<a class="jxr_linenumber" name="L975" href="#L975">975</a>         Complex z = <strong class="jxr_keyword">new</strong> Complex(3, 4);
-<a class="jxr_linenumber" name="L976" href="#L976">976</a>         Complex expected = <strong class="jxr_keyword">new</strong> Complex(-6.54812, -7.61923);
-<a class="jxr_linenumber" name="L977" href="#L977">977</a>         TestUtils.assertEquals(expected, z.sinh(), 1.0e-5);
-<a class="jxr_linenumber" name="L978" href="#L978">978</a>     }
-<a class="jxr_linenumber" name="L979" href="#L979">979</a> 
-<a class="jxr_linenumber" name="L980" href="#L980">980</a>     @Test
-<a class="jxr_linenumber" name="L981" href="#L981">981</a>     <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> testSinhNaN() {
-<a class="jxr_linenumber" name="L982" href="#L982">982</a>         Assert.assertTrue(Complex.NaN.sinh().isNaN());
-<a class="jxr_linenumber" name="L983" href="#L983">983</a>     }
-<a class="jxr_linenumber" name="L984" href="#L984">984</a> 
-<a class="jxr_linenumber" name="L985" href="#L985">985</a>     @Test
-<a class="jxr_linenumber" name="L986" href="#L986">986</a>     <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> testSinhInf() {
-<a class="jxr_linenumber" name="L987" href="#L987">987</a>         TestUtils.assertSame(Complex.NaN, oneInf.sinh());
-<a class="jxr_linenumber" name="L988" href="#L988">988</a>         TestUtils.assertSame(Complex.NaN, oneNegInf.sinh());
-<a class="jxr_linenumber" name="L989" href="#L989">989</a>         TestUtils.assertSame(infInf, infOne.sinh());
-<a class="jxr_linenumber" name="L990" href="#L990">990</a>         TestUtils.assertSame(negInfInf, negInfOne.sinh());
-<a class="jxr_linenumber" name="L991" href="#L991">991</a>         TestUtils.assertSame(Complex.NaN, infInf.sinh());
-<a class="jxr_linenumber" name="L992" href="#L992">992</a>         TestUtils.assertSame(Complex.NaN, infNegInf.sinh());
-<a class="jxr_linenumber" name="L993" href="#L993">993</a>         TestUtils.assertSame(Complex.NaN, negInfInf.sinh());
-<a class="jxr_linenumber" name="L994" href="#L994">994</a>         TestUtils.assertSame(Complex.NaN, negInfNegInf.sinh());
-<a class="jxr_linenumber" name="L995" href="#L995">995</a>     }
-<a class="jxr_linenumber" name="L996" href="#L996">996</a> 
-<a class="jxr_linenumber" name="L997" href="#L997">997</a>     @Test
-<a class="jxr_linenumber" name="L998" href="#L998">998</a>     <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> testSqrtRealPositive() {
-<a class="jxr_linenumber" name="L999" href="#L999">999</a>         Complex z = <strong class="jxr_keyword">new</strong> Complex(3, 4);
-<a class="jxr_linenumber" name="L1000" href="#L1000">1000</a>         Complex expected = <strong class="jxr_keyword">new</strong> Complex(2, 1);
-<a class="jxr_linenumber" name="L1001" href="#L1001">1001</a>         TestUtils.assertEquals(expected, z.sqrt(), 1.0e-5);
-<a class="jxr_linenumber" name="L1002" href="#L1002">1002</a>     }
+<a class="jxr_linenumber" name="L786" href="#L786">786</a>     }
+<a class="jxr_linenumber" name="L787" href="#L787">787</a> 
+<a class="jxr_linenumber" name="L788" href="#L788">788</a>     @Test
+<a class="jxr_linenumber" name="L789" href="#L789">789</a>     <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> testExpInf2() {
+<a class="jxr_linenumber" name="L790" href="#L790">790</a>         TestUtils.assertSame(Complex.NaN, oneNegInf.exp());
+<a class="jxr_linenumber" name="L791" href="#L791">791</a>     }
+<a class="jxr_linenumber" name="L792" href="#L792">792</a> 
+<a class="jxr_linenumber" name="L793" href="#L793">793</a>     @Test
+<a class="jxr_linenumber" name="L794" href="#L794">794</a>     <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> testExpInf3() {
+<a class="jxr_linenumber" name="L795" href="#L795">795</a>         TestUtils.assertSame(infInf, infOne.exp());
+<a class="jxr_linenumber" name="L796" href="#L796">796</a>     }
+<a class="jxr_linenumber" name="L797" href="#L797">797</a> 
+<a class="jxr_linenumber" name="L798" href="#L798">798</a>     @Test
+<a class="jxr_linenumber" name="L799" href="#L799">799</a>     <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> testJava() {<em class="jxr_comment">// TODO more debug</em>
+<a class="jxr_linenumber" name="L800" href="#L800">800</a>         System.out.println(<span class="jxr_string">"&gt;&gt;testJava()"</span>);
+<a class="jxr_linenumber" name="L801" href="#L801">801</a>         <em class="jxr_comment">// FastMathTest#testExpSpecialCases() checks the following:</em>
+<a class="jxr_linenumber" name="L802" href="#L802">802</a>         <em class="jxr_comment">// Assert.assertEquals("exp of -infinity should be 0.0", 0.0, FastMath.exp(Double.NEGATIVE_INFINITY), Precision.EPSILON);</em>
+<a class="jxr_linenumber" name="L803" href="#L803">803</a>         <em class="jxr_comment">// Let's check how well Math works:</em>
+<a class="jxr_linenumber" name="L804" href="#L804">804</a>         System.out.println(<span class="jxr_string">"Math.exp="</span>+Math.exp(Double.NEGATIVE_INFINITY));
+<a class="jxr_linenumber" name="L805" href="#L805">805</a>         String props[] = {
+<a class="jxr_linenumber" name="L806" href="#L806">806</a>         <span class="jxr_string">"java.version"</span>, <em class="jxr_comment">//    Java Runtime Environment version</em>
+<a class="jxr_linenumber" name="L807" href="#L807">807</a>         <span class="jxr_string">"java.vendor"</span>, <em class="jxr_comment">// Java Runtime Environment vendor</em>
+<a class="jxr_linenumber" name="L808" href="#L808">808</a>         <span class="jxr_string">"java.vm.specification.version"</span>, <em class="jxr_comment">//   Java Virtual Machine specification version</em>
+<a class="jxr_linenumber" name="L809" href="#L809">809</a>         <span class="jxr_string">"java.vm.specification.vendor"</span>, <em class="jxr_comment">//    Java Virtual Machine specification vendor</em>
+<a class="jxr_linenumber" name="L810" href="#L810">810</a>         <span class="jxr_string">"java.vm.specification.name"</span>, <em class="jxr_comment">//  Java Virtual Machine specification name</em>
+<a class="jxr_linenumber" name="L811" href="#L811">811</a>         <span class="jxr_string">"java.vm.version"</span>, <em class="jxr_comment">// Java Virtual Machine implementation version</em>
+<a class="jxr_linenumber" name="L812" href="#L812">812</a>         <span class="jxr_string">"java.vm.vendor"</span>, <em class="jxr_comment">//  Java Virtual Machine implementation vendor</em>
+<a class="jxr_linenumber" name="L813" href="#L813">813</a>         <span class="jxr_string">"java.vm.name"</span>, <em class="jxr_comment">//    Java Virtual Machine implementation name</em>
+<a class="jxr_linenumber" name="L814" href="#L814">814</a>         <span class="jxr_string">"java.specification.version"</span>, <em class="jxr_comment">//  Java Runtime Environment specification version</em>
+<a class="jxr_linenumber" name="L815" href="#L815">815</a>         <span class="jxr_string">"java.specification.vendor"</span>, <em class="jxr_comment">//   Java Runtime Environment specification vendor</em>
+<a class="jxr_linenumber" name="L816" href="#L816">816</a>         <span class="jxr_string">"java.specification.name"</span>, <em class="jxr_comment">// Java Runtime Environment specification name</em>
+<a class="jxr_linenumber" name="L817" href="#L817">817</a>         <span class="jxr_string">"java.class.version"</span>, <em class="jxr_comment">//  Java class format version number</em>
+<a class="jxr_linenumber" name="L818" href="#L818">818</a>         };
+<a class="jxr_linenumber" name="L819" href="#L819">819</a>         <strong class="jxr_keyword">for</strong>(String t : props) {
+<a class="jxr_linenumber" name="L820" href="#L820">820</a>             System.out.println(t + <span class="jxr_string">"="</span> + System.getProperty(t));
+<a class="jxr_linenumber" name="L821" href="#L821">821</a>         }    
+<a class="jxr_linenumber" name="L822" href="#L822">822</a>         System.out.println(<span class="jxr_string">"&lt;&lt;testJava()"</span>);
+<a class="jxr_linenumber" name="L823" href="#L823">823</a>     }
+<a class="jxr_linenumber" name="L824" href="#L824">824</a> 
+<a class="jxr_linenumber" name="L825" href="#L825">825</a>     @Test
+<a class="jxr_linenumber" name="L826" href="#L826">826</a>     <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> testExpInf4() {
+<a class="jxr_linenumber" name="L827" href="#L827">827</a>         <em class="jxr_comment">// TODO: temp debug start</em>
+<a class="jxr_linenumber" name="L828" href="#L828">828</a>         System.out.println(<span class="jxr_string">"&gt;&gt;testExpInf4()"</span>);
+<a class="jxr_linenumber" name="L829" href="#L829">829</a>         <strong class="jxr_keyword">double</strong> inf = negInfOne.getReal();
+<a class="jxr_linenumber" name="L830" href="#L830">830</a>         System.out.println(<span class="jxr_string">"inf="</span>+inf);
+<a class="jxr_linenumber" name="L831" href="#L831">831</a>         <strong class="jxr_keyword">int</strong> intVal = (<strong class="jxr_keyword">int</strong>) -inf;
+<a class="jxr_linenumber" name="L832" href="#L832">832</a>         System.out.println(<span class="jxr_string">"intval="</span>+intVal);
+<a class="jxr_linenumber" name="L833" href="#L833">833</a>         System.out.println(<span class="jxr_string">"neginf&lt;0="</span> + (inf &lt; 0.0));
+<a class="jxr_linenumber" name="L834" href="#L834">834</a>         <em class="jxr_comment">// TODO: temp debug end</em>
+<a class="jxr_linenumber" name="L835" href="#L835">835</a>         System.out.println(<span class="jxr_string">"expReal="</span>+FastMath.exp(negInfOne.getReal())); <em class="jxr_comment">// TODO temp debug</em>
+<a class="jxr_linenumber" name="L836" href="#L836">836</a>         System.out.println(<span class="jxr_string">"cosImag="</span>+FastMath.cos(negInfOne.getImaginary())); <em class="jxr_comment">// TODO temp debug</em>
+<a class="jxr_linenumber" name="L837" href="#L837">837</a>         System.out.println(<span class="jxr_string">"sinImag="</span>+FastMath.sin(negInfOne.getImaginary())); <em class="jxr_comment">// TODO temp debug</em>
+<a class="jxr_linenumber" name="L838" href="#L838">838</a>         <strong class="jxr_keyword">final</strong> Complex exp = negInfOne.exp();
+<a class="jxr_linenumber" name="L839" href="#L839">839</a>         System.out.println(<span class="jxr_string">"result="</span>+exp); <em class="jxr_comment">// TODO temp debug</em>
+<a class="jxr_linenumber" name="L840" href="#L840">840</a>         TestUtils.assertSame(Complex.ZERO, exp);
+<a class="jxr_linenumber" name="L841" href="#L841">841</a>         System.out.println(<span class="jxr_string">"&lt;&lt;testExpInf4()"</span>); <em class="jxr_comment">// TODO debug</em>
+<a class="jxr_linenumber" name="L842" href="#L842">842</a>     }
+<a class="jxr_linenumber" name="L843" href="#L843">843</a> 
+<a class="jxr_linenumber" name="L844" href="#L844">844</a>     @Test
+<a class="jxr_linenumber" name="L845" href="#L845">845</a>     <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> testExpInf5() {
+<a class="jxr_linenumber" name="L846" href="#L846">846</a>         TestUtils.assertSame(Complex.NaN, infInf.exp());
+<a class="jxr_linenumber" name="L847" href="#L847">847</a>     }
+<a class="jxr_linenumber" name="L848" href="#L848">848</a> 
+<a class="jxr_linenumber" name="L849" href="#L849">849</a>     @Test
+<a class="jxr_linenumber" name="L850" href="#L850">850</a>     <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> testExpInf6() {
+<a class="jxr_linenumber" name="L851" href="#L851">851</a>         TestUtils.assertSame(Complex.NaN, infNegInf.exp());
+<a class="jxr_linenumber" name="L852" href="#L852">852</a>     }
+<a class="jxr_linenumber" name="L853" href="#L853">853</a> 
+<a class="jxr_linenumber" name="L854" href="#L854">854</a>     @Test
+<a class="jxr_linenumber" name="L855" href="#L855">855</a>     <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> testExpInf7() {
+<a class="jxr_linenumber" name="L856" href="#L856">856</a>         TestUtils.assertSame(Complex.NaN, negInfInf.exp());
+<a class="jxr_linenumber" name="L857" href="#L857">857</a>     }
+<a class="jxr_linenumber" name="L858" href="#L858">858</a> 
+<a class="jxr_linenumber" name="L859" href="#L859">859</a>     @Test
+<a class="jxr_linenumber" name="L860" href="#L860">860</a>     <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> testExpInf8() {
+<a class="jxr_linenumber" name="L861" href="#L861">861</a>         TestUtils.assertSame(Complex.NaN, negInfNegInf.exp());
+<a class="jxr_linenumber" name="L862" href="#L862">862</a>     }
+<a class="jxr_linenumber" name="L863" href="#L863">863</a> 
+<a class="jxr_linenumber" name="L864" href="#L864">864</a>     @Test
+<a class="jxr_linenumber" name="L865" href="#L865">865</a>     <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> testLog() {
+<a class="jxr_linenumber" name="L866" href="#L866">866</a>         Complex z = <strong class="jxr_keyword">new</strong> Complex(3, 4);
+<a class="jxr_linenumber" name="L867" href="#L867">867</a>         Complex expected = <strong class="jxr_keyword">new</strong> Complex(1.60944, 0.927295);
+<a class="jxr_linenumber" name="L868" href="#L868">868</a>         TestUtils.assertEquals(expected, z.log(), 1.0e-5);
+<a class="jxr_linenumber" name="L869" href="#L869">869</a>     }
+<a class="jxr_linenumber" name="L870" href="#L870">870</a> 
+<a class="jxr_linenumber" name="L871" href="#L871">871</a>     @Test
+<a class="jxr_linenumber" name="L872" href="#L872">872</a>     <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> testLogNaN() {
+<a class="jxr_linenumber" name="L873" href="#L873">873</a>         Assert.assertTrue(Complex.NaN.log().isNaN());
+<a class="jxr_linenumber" name="L874" href="#L874">874</a>     }
+<a class="jxr_linenumber" name="L875" href="#L875">875</a> 
+<a class="jxr_linenumber" name="L876" href="#L876">876</a>     @Test
+<a class="jxr_linenumber" name="L877" href="#L877">877</a>     <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> testLogInf() {
+<a class="jxr_linenumber" name="L878" href="#L878">878</a>         TestUtils.assertEquals(<strong class="jxr_keyword">new</strong> Complex(inf, pi / 2),
+<a class="jxr_linenumber" name="L879" href="#L879">879</a>                 oneInf.log(), 10e-12);
+<a class="jxr_linenumber" name="L880" href="#L880">880</a>         TestUtils.assertEquals(<strong class="jxr_keyword">new</strong> Complex(inf, -pi / 2),
+<a class="jxr_linenumber" name="L881" href="#L881">881</a>                 oneNegInf.log(), 10e-12);
+<a class="jxr_linenumber" name="L882" href="#L882">882</a>         TestUtils.assertEquals(infZero, infOne.log(), 10e-12);
+<a class="jxr_linenumber" name="L883" href="#L883">883</a>         TestUtils.assertEquals(<strong class="jxr_keyword">new</strong> Complex(inf, pi),
+<a class="jxr_linenumber" name="L884" href="#L884">884</a>                 negInfOne.log(), 10e-12);
+<a class="jxr_linenumber" name="L885" href="#L885">885</a>         TestUtils.assertEquals(<strong class="jxr_keyword">new</strong> Complex(inf, pi / 4),
+<a class="jxr_linenumber" name="L886" href="#L886">886</a>                 infInf.log(), 10e-12);
+<a class="jxr_linenumber" name="L887" href="#L887">887</a>         TestUtils.assertEquals(<strong class="jxr_keyword">new</strong> Complex(inf, -pi / 4),
+<a class="jxr_linenumber" name="L888" href="#L888">888</a>                 infNegInf.log(), 10e-12);
+<a class="jxr_linenumber" name="L889" href="#L889">889</a>         TestUtils.assertEquals(<strong class="jxr_keyword">new</strong> Complex(inf, 3d * pi / 4),
+<a class="jxr_linenumber" name="L890" href="#L890">890</a>                 negInfInf.log(), 10e-12);
+<a class="jxr_linenumber" name="L891" href="#L891">891</a>         TestUtils.assertEquals(<strong class="jxr_keyword">new</strong> Complex(inf, - 3d * pi / 4),
+<a class="jxr_linenumber" name="L892" href="#L892">892</a>                 negInfNegInf.log(), 10e-12);
+<a class="jxr_linenumber" name="L893" href="#L893">893</a>     }
+<a class="jxr_linenumber" name="L894" href="#L894">894</a> 
+<a class="jxr_linenumber" name="L895" href="#L895">895</a>     @Test
+<a class="jxr_linenumber" name="L896" href="#L896">896</a>     <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> testLogZero() {
+<a class="jxr_linenumber" name="L897" href="#L897">897</a>         TestUtils.assertSame(negInfZero, Complex.ZERO.log());
+<a class="jxr_linenumber" name="L898" href="#L898">898</a>     }
+<a class="jxr_linenumber" name="L899" href="#L899">899</a> 
+<a class="jxr_linenumber" name="L900" href="#L900">900</a>     @Test
+<a class="jxr_linenumber" name="L901" href="#L901">901</a>     <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> testPow() {
+<a class="jxr_linenumber" name="L902" href="#L902">902</a>         Complex x = <strong class="jxr_keyword">new</strong> Complex(3, 4);
+<a class="jxr_linenumber" name="L903" href="#L903">903</a>         Complex y = <strong class="jxr_keyword">new</strong> Complex(5, 6);
+<a class="jxr_linenumber" name="L904" href="#L904">904</a>         Complex expected = <strong class="jxr_keyword">new</strong> Complex(-1.860893, 11.83677);
+<a class="jxr_linenumber" name="L905" href="#L905">905</a>         TestUtils.assertEquals(expected, x.pow(y), 1.0e-5);
+<a class="jxr_linenumber" name="L906" href="#L906">906</a>     }
+<a class="jxr_linenumber" name="L907" href="#L907">907</a> 
+<a class="jxr_linenumber" name="L908" href="#L908">908</a>     @Test
+<a class="jxr_linenumber" name="L909" href="#L909">909</a>     <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> testPowNaNBase() {
+<a class="jxr_linenumber" name="L910" href="#L910">910</a>         Complex x = <strong class="jxr_keyword">new</strong> Complex(3, 4);
+<a class="jxr_linenumber" name="L911" href="#L911">911</a>         Assert.assertTrue(Complex.NaN.pow(x).isNaN());
+<a class="jxr_linenumber" name="L912" href="#L912">912</a>     }
+<a class="jxr_linenumber" name="L913" href="#L913">913</a> 
+<a class="jxr_linenumber" name="L914" href="#L914">914</a>     @Test
+<a class="jxr_linenumber" name="L915" href="#L915">915</a>     <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> testPowNaNExponent() {
+<a class="jxr_linenumber" name="L916" href="#L916">916</a>         Complex x = <strong class="jxr_keyword">new</strong> Complex(3, 4);
+<a class="jxr_linenumber" name="L917" href="#L917">917</a>         Assert.assertTrue(x.pow(Complex.NaN).isNaN());
+<a class="jxr_linenumber" name="L918" href="#L918">918</a>     }
+<a class="jxr_linenumber" name="L919" href="#L919">919</a> 
+<a class="jxr_linenumber" name="L920" href="#L920">920</a>    @Test
+<a class="jxr_linenumber" name="L921" href="#L921">921</a>    <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> testPowInf() {
+<a class="jxr_linenumber" name="L922" href="#L922">922</a>        TestUtils.assertSame(Complex.NaN,Complex.ONE.pow(oneInf));
+<a class="jxr_linenumber" name="L923" href="#L923">923</a>        TestUtils.assertSame(Complex.NaN,Complex.ONE.pow(oneNegInf));
+<a class="jxr_linenumber" name="L924" href="#L924">924</a>        TestUtils.assertSame(Complex.NaN,Complex.ONE.pow(infOne));
+<a class="jxr_linenumber" name="L925" href="#L925">925</a>        TestUtils.assertSame(Complex.NaN,Complex.ONE.pow(infInf));
+<a class="jxr_linenumber" name="L926" href="#L926">926</a>        TestUtils.assertSame(Complex.NaN,Complex.ONE.pow(infNegInf));
+<a class="jxr_linenumber" name="L927" href="#L927">927</a>        TestUtils.assertSame(Complex.NaN,Complex.ONE.pow(negInfInf));
+<a class="jxr_linenumber" name="L928" href="#L928">928</a>        TestUtils.assertSame(Complex.NaN,Complex.ONE.pow(negInfNegInf));
+<a class="jxr_linenumber" name="L929" href="#L929">929</a>        TestUtils.assertSame(Complex.NaN,infOne.pow(Complex.ONE));
+<a class="jxr_linenumber" name="L930" href="#L930">930</a>        TestUtils.assertSame(Complex.NaN,negInfOne.pow(Complex.ONE));
+<a class="jxr_linenumber" name="L931" href="#L931">931</a>        TestUtils.assertSame(Complex.NaN,infInf.pow(Complex.ONE));
+<a class="jxr_linenumber" name="L932" href="#L932">932</a>        TestUtils.assertSame(Complex.NaN,infNegInf.pow(Complex.ONE));
+<a class="jxr_linenumber" name="L933" href="#L933">933</a>        TestUtils.assertSame(Complex.NaN,negInfInf.pow(Complex.ONE));
+<a class="jxr_linenumber" name="L934" href="#L934">934</a>        TestUtils.assertSame(Complex.NaN,negInfNegInf.pow(Complex.ONE));
+<a class="jxr_linenumber" name="L935" href="#L935">935</a>        TestUtils.assertSame(Complex.NaN,negInfNegInf.pow(infNegInf));
+<a class="jxr_linenumber" name="L936" href="#L936">936</a>        TestUtils.assertSame(Complex.NaN,negInfNegInf.pow(negInfNegInf));
+<a class="jxr_linenumber" name="L937" href="#L937">937</a>        TestUtils.assertSame(Complex.NaN,negInfNegInf.pow(infInf));
+<a class="jxr_linenumber" name="L938" href="#L938">938</a>        TestUtils.assertSame(Complex.NaN,infInf.pow(infNegInf));
+<a class="jxr_linenumber" name="L939" href="#L939">939</a>        TestUtils.assertSame(Complex.NaN,infInf.pow(negInfNegInf));
+<a class="jxr_linenumber" name="L940" href="#L940">940</a>        TestUtils.assertSame(Complex.NaN,infInf.pow(infInf));
+<a class="jxr_linenumber" name="L941" href="#L941">941</a>        TestUtils.assertSame(Complex.NaN,infNegInf.pow(infNegInf));
+<a class="jxr_linenumber" name="L942" href="#L942">942</a>        TestUtils.assertSame(Complex.NaN,infNegInf.pow(negInfNegInf));
+<a class="jxr_linenumber" name="L943" href="#L943">943</a>        TestUtils.assertSame(Complex.NaN,infNegInf.pow(infInf));
+<a class="jxr_linenumber" name="L944" href="#L944">944</a>    }
+<a class="jxr_linenumber" name="L945" href="#L945">945</a> 
+<a class="jxr_linenumber" name="L946" href="#L946">946</a>    @Test
+<a class="jxr_linenumber" name="L947" href="#L947">947</a>    <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> testPowZero() {
+<a class="jxr_linenumber" name="L948" href="#L948">948</a>        TestUtils.assertSame(Complex.NaN,
+<a class="jxr_linenumber" name="L949" href="#L949">949</a>                Complex.ZERO.pow(Complex.ONE));
+<a class="jxr_linenumber" name="L950" href="#L950">950</a>        TestUtils.assertSame(Complex.NaN,
+<a class="jxr_linenumber" name="L951" href="#L951">951</a>                Complex.ZERO.pow(Complex.ZERO));
+<a class="jxr_linenumber" name="L952" href="#L952">952</a>        TestUtils.assertSame(Complex.NaN,
+<a class="jxr_linenumber" name="L953" href="#L953">953</a>                Complex.ZERO.pow(Complex.I));
+<a class="jxr_linenumber" name="L954" href="#L954">954</a>        TestUtils.assertEquals(Complex.ONE,
+<a class="jxr_linenumber" name="L955" href="#L955">955</a>                Complex.ONE.pow(Complex.ZERO), 10e-12);
+<a class="jxr_linenumber" name="L956" href="#L956">956</a>        TestUtils.assertEquals(Complex.ONE,
+<a class="jxr_linenumber" name="L957" href="#L957">957</a>                Complex.I.pow(Complex.ZERO), 10e-12);
+<a class="jxr_linenumber" name="L958" href="#L958">958</a>        TestUtils.assertEquals(Complex.ONE,
+<a class="jxr_linenumber" name="L959" href="#L959">959</a>                <strong class="jxr_keyword">new</strong> Complex(-1, 3).pow(Complex.ZERO), 10e-12);
+<a class="jxr_linenumber" name="L960" href="#L960">960</a>    }
+<a class="jxr_linenumber" name="L961" href="#L961">961</a> 
+<a class="jxr_linenumber" name="L962" href="#L962">962</a>     @Test
+<a class="jxr_linenumber" name="L963" href="#L963">963</a>     <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> testScalarPow() {
+<a class="jxr_linenumber" name="L964" href="#L964">964</a>         Complex x = <strong class="jxr_keyword">new</strong> Complex(3, 4);
+<a class="jxr_linenumber" name="L965" href="#L965">965</a>         <strong class="jxr_keyword">double</strong> yDouble = 5.0;
+<a class="jxr_linenumber" name="L966" href="#L966">966</a>         Complex yComplex = <strong class="jxr_keyword">new</strong> Complex(yDouble);
+<a class="jxr_linenumber" name="L967" href="#L967">967</a>         Assert.assertEquals(x.pow(yComplex), x.pow(yDouble));
+<a class="jxr_linenumber" name="L968" href="#L968">968</a>     }
+<a class="jxr_linenumber" name="L969" href="#L969">969</a> 
+<a class="jxr_linenumber" name="L970" href="#L970">970</a>     @Test
+<a class="jxr_linenumber" name="L971" href="#L971">971</a>     <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> testScalarPowNaNBase() {
+<a class="jxr_linenumber" name="L972" href="#L972">972</a>         Complex x = Complex.NaN;
+<a class="jxr_linenumber" name="L973" href="#L973">973</a>         <strong class="jxr_keyword">double</strong> yDouble = 5.0;
+<a class="jxr_linenumber" name="L974" href="#L974">974</a>         Complex yComplex = <strong class="jxr_keyword">new</strong> Complex(yDouble);
+<a class="jxr_linenumber" name="L975" href="#L975">975</a>         Assert.assertEquals(x.pow(yComplex), x.pow(yDouble));
+<a class="jxr_linenumber" name="L976" href="#L976">976</a>     }
+<a class="jxr_linenumber" name="L977" href="#L977">977</a> 
+<a class="jxr_linenumber" name="L978" href="#L978">978</a>     @Test
+<a class="jxr_linenumber" name="L979" href="#L979">979</a>     <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> testScalarPowNaNExponent() {
+<a class="jxr_linenumber" name="L980" href="#L980">980</a>         Complex x = <strong class="jxr_keyword">new</strong> Complex(3, 4);
+<a class="jxr_linenumber" name="L981" href="#L981">981</a>         <strong class="jxr_keyword">double</strong> yDouble = Double.NaN;
+<a class="jxr_linenumber" name="L982" href="#L982">982</a>         Complex yComplex = <strong class="jxr_keyword">new</strong> Complex(yDouble);
+<a class="jxr_linenumber" name="L983" href="#L983">983</a>         Assert.assertEquals(x.pow(yComplex), x.pow(yDouble));
+<a class="jxr_linenumber" name="L984" href="#L984">984</a>     }
+<a class="jxr_linenumber" name="L985" href="#L985">985</a> 
+<a class="jxr_linenumber" name="L986" href="#L986">986</a>    @Test
+<a class="jxr_linenumber" name="L987" href="#L987">987</a>    <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> testScalarPowInf() {
+<a class="jxr_linenumber" name="L988" href="#L988">988</a>        TestUtils.assertSame(Complex.NaN,Complex.ONE.pow(Double.POSITIVE_INFINITY));
+<a class="jxr_linenumber" name="L989" href="#L989">989</a>        TestUtils.assertSame(Complex.NaN,Complex.ONE.pow(Double.NEGATIVE_INFINITY));
+<a class="jxr_linenumber" name="L990" href="#L990">990</a>        TestUtils.assertSame(Complex.NaN,infOne.pow(1.0));
+<a class="jxr_linenumber" name="L991" href="#L991">991</a>        TestUtils.assertSame(Complex.NaN,negInfOne.pow(1.0));
+<a class="jxr_linenumber" name="L992" href="#L992">992</a>        TestUtils.assertSame(Complex.NaN,infInf.pow(1.0));
+<a class="jxr_linenumber" name="L993" href="#L993">993</a>        TestUtils.assertSame(Complex.NaN,infNegInf.pow(1.0));
+<a class="jxr_linenumber" name="L994" href="#L994">994</a>        TestUtils.assertSame(Complex.NaN,negInfInf.pow(10));
+<a class="jxr_linenumber" name="L995" href="#L995">995</a>        TestUtils.assertSame(Complex.NaN,negInfNegInf.pow(1.0));
+<a class="jxr_linenumber" name="L996" href="#L996">996</a>        TestUtils.assertSame(Complex.NaN,negInfNegInf.pow(Double.POSITIVE_INFINITY));
+<a class="jxr_linenumber" name="L997" href="#L997">997</a>        TestUtils.assertSame(Complex.NaN,negInfNegInf.pow(Double.POSITIVE_INFINITY));
+<a class="jxr_linenumber" name="L998" href="#L998">998</a>        TestUtils.assertSame(Complex.NaN,infInf.pow(Double.POSITIVE_INFINITY));
+<a class="jxr_linenumber" name="L999" href="#L999">999</a>        TestUtils.assertSame(Complex.NaN,infInf.pow(Double.NEGATIVE_INFINITY));
+<a class="jxr_linenumber" name="L1000" href="#L1000">1000</a>        TestUtils.assertSame(Complex.NaN,infNegInf.pow(Double.NEGATIVE_INFINITY));
+<a class="jxr_linenumber" name="L1001" href="#L1001">1001</a>        TestUtils.assertSame(Complex.NaN,infNegInf.pow(Double.POSITIVE_INFINITY));
+<a class="jxr_linenumber" name="L1002" href="#L1002">1002</a>    }
 <a class="jxr_linenumber" name="L1003" href="#L1003">1003</a> 
-<a class="jxr_linenumber" name="L1004" href="#L1004">1004</a>     @Test
-<a class="jxr_linenumber" name="L1005" href="#L1005">1005</a>     <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> testSqrtRealZero() {
-<a class="jxr_linenumber" name="L1006" href="#L1006">1006</a>         Complex z = <strong class="jxr_keyword">new</strong> Complex(0.0, 4);
-<a class="jxr_linenumber" name="L1007" href="#L1007">1007</a>         Complex expected = <strong class="jxr_keyword">new</strong> Complex(1.41421, 1.41421);
-<a class="jxr_linenumber" name="L1008" href="#L1008">1008</a>         TestUtils.assertEquals(expected, z.sqrt(), 1.0e-5);
-<a class="jxr_linenumber" name="L1009" href="#L1009">1009</a>     }
-<a class="jxr_linenumber" name="L1010" href="#L1010">1010</a> 
-<a class="jxr_linenumber" name="L1011" href="#L1011">1011</a>     @Test
-<a class="jxr_linenumber" name="L1012" href="#L1012">1012</a>     <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> testSqrtRealNegative() {
-<a class="jxr_linenumber" name="L1013" href="#L1013">1013</a>         Complex z = <strong class="jxr_keyword">new</strong> Complex(-3.0, 4);
-<a class="jxr_linenumber" name="L1014" href="#L1014">1014</a>         Complex expected = <strong class="jxr_keyword">new</strong> Complex(1, 2);
-<a class="jxr_linenumber" name="L1015" href="#L1015">1015</a>         TestUtils.assertEquals(expected, z.sqrt(), 1.0e-5);
+<a class="jxr_linenumber" name="L1004" href="#L1004">1004</a>    @Test
+<a class="jxr_linenumber" name="L1005" href="#L1005">1005</a>    <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> testScalarPowZero() {
+<a class="jxr_linenumber" name="L1006" href="#L1006">1006</a>        TestUtils.assertSame(Complex.NaN, Complex.ZERO.pow(1.0));
+<a class="jxr_linenumber" name="L1007" href="#L1007">1007</a>        TestUtils.assertSame(Complex.NaN, Complex.ZERO.pow(0.0));
+<a class="jxr_linenumber" name="L1008" href="#L1008">1008</a>        TestUtils.assertEquals(Complex.ONE, Complex.ONE.pow(0.0), 10e-12);
+<a class="jxr_linenumber" name="L1009" href="#L1009">1009</a>        TestUtils.assertEquals(Complex.ONE, Complex.I.pow(0.0), 10e-12);
+<a class="jxr_linenumber" name="L1010" href="#L1010">1010</a>        TestUtils.assertEquals(Complex.ONE, <strong class="jxr_keyword">new</strong> Complex(-1, 3).pow(0.0), 10e-12);
+<a class="jxr_linenumber" name="L1011" href="#L1011">1011</a>    }
+<a class="jxr_linenumber" name="L1012" href="#L1012">1012</a> 
+<a class="jxr_linenumber" name="L1013" href="#L1013">1013</a>     @Test(expected=NullArgumentException.<strong class="jxr_keyword">class</strong>)
+<a class="jxr_linenumber" name="L1014" href="#L1014">1014</a>     <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> testpowNull() {
+<a class="jxr_linenumber" name="L1015" href="#L1015">1015</a>         Complex.ONE.pow(<strong class="jxr_keyword">null</strong>);
 <a class="jxr_linenumber" name="L1016" href="#L1016">1016</a>     }
 <a class="jxr_linenumber" name="L1017" href="#L1017">1017</a> 
 <a class="jxr_linenumber" name="L1018" href="#L1018">1018</a>     @Test
-<a class="jxr_linenumber" name="L1019" href="#L1019">1019</a>     <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> testSqrtImaginaryZero() {
-<a class="jxr_linenumber" name="L1020" href="#L1020">1020</a>         Complex z = <strong class="jxr_keyword">new</strong> Complex(-3.0, 0.0);
-<a class="jxr_linenumber" name="L1021" href="#L1021">1021</a>         Complex expected = <strong class="jxr_keyword">new</strong> Complex(0.0, 1.73205);
-<a class="jxr_linenumber" name="L1022" href="#L1022">1022</a>         TestUtils.assertEquals(expected, z.sqrt(), 1.0e-5);
+<a class="jxr_linenumber" name="L1019" href="#L1019">1019</a>     <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> testSin() {
+<a class="jxr_linenumber" name="L1020" href="#L1020">1020</a>         Complex z = <strong class="jxr_keyword">new</strong> Complex(3, 4);
+<a class="jxr_linenumber" name="L1021" href="#L1021">1021</a>         Complex expected = <strong class="jxr_keyword">new</strong> Complex(3.853738, -27.01681);
+<a class="jxr_linenumber" name="L1022" href="#L1022">1022</a>         TestUtils.assertEquals(expected, z.sin(), 1.0e-5);
 <a class="jxr_linenumber" name="L1023" href="#L1023">1023</a>     }
 <a class="jxr_linenumber" name="L1024" href="#L1024">1024</a> 
 <a class="jxr_linenumber" name="L1025" href="#L1025">1025</a>     @Test
-<a class="jxr_linenumber" name="L1026" href="#L1026">1026</a>     <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> testSqrtImaginaryNegative() {
-<a class="jxr_linenumber" name="L1027" href="#L1027">1027</a>         Complex z = <strong class="jxr_keyword">new</strong> Complex(-3.0, -4.0);
-<a class="jxr_linenumber" name="L1028" href="#L1028">1028</a>         Complex expected = <strong class="jxr_keyword">new</strong> Complex(1.0, -2.0);
-<a class="jxr_linenumber" name="L1029" href="#L1029">1029</a>         TestUtils.assertEquals(expected, z.sqrt(), 1.0e-5);
-<a class="jxr_linenumber" name="L1030" href="#L1030">1030</a>     }
-<a class="jxr_linenumber" name="L1031" href="#L1031">1031</a> 
-<a class="jxr_linenumber" name="L1032" href="#L1032">1032</a>     @Test
-<a class="jxr_linenumber" name="L1033" href="#L1033">1033</a>     <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> testSqrtPolar() {
-<a class="jxr_linenumber" name="L1034" href="#L1034">1034</a>         <strong class="jxr_keyword">double</strong> r = 1;
-<a class="jxr_linenumber" name="L1035" href="#L1035">1035</a>         <strong class="jxr_keyword">for</strong> (<strong class="jxr_keyword">int</strong> i = 0; i &lt; 5; i++) {
-<a class="jxr_linenumber" name="L1036" href="#L1036">1036</a>             r += i;
-<a class="jxr_linenumber" name="L1037" href="#L1037">1037</a>             <strong class="jxr_keyword">double</strong> theta = 0;
-<a class="jxr_linenumber" name="L1038" href="#L1038">1038</a>             <strong class="jxr_keyword">for</strong> (<strong class="jxr_keyword">int</strong> j =0; j &lt; 11; j++) {
-<a class="jxr_linenumber" name="L1039" href="#L1039">1039</a>                 theta += pi /12;
-<a class="jxr_linenumber" name="L1040" href="#L1040">1040</a>                 Complex z = ComplexUtils.polar2Complex(r, theta);
-<a class="jxr_linenumber" name="L1041" href="#L1041">1041</a>                 Complex sqrtz = ComplexUtils.polar2Complex(FastMath.sqrt(r), theta / 2);
-<a class="jxr_linenumber" name="L1042" href="#L1042">1042</a>                 TestUtils.assertEquals(sqrtz, z.sqrt(), 10e-12);
-<a class="jxr_linenumber" name="L1043" href="#L1043">1043</a>             }
-<a class="jxr_linenumber" name="L1044" href="#L1044">1044</a>         }
-<a class="jxr_linenumber" name="L1045" href="#L1045">1045</a>     }
-<a class="jxr_linenumber" name="L1046" href="#L1046">1046</a> 
-<a class="jxr_linenumber" name="L1047" href="#L1047">1047</a>     @Test
-<a class="jxr_linenumber" name="L1048" href="#L1048">1048</a>     <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> testSqrtNaN() {
-<a class="jxr_linenumber" name="L1049" href="#L1049">1049</a>         Assert.assertTrue(Complex.NaN.sqrt().isNaN());
-<a class="jxr_linenumber" name="L1050" href="#L1050">1050</a>     }
-<a class="jxr_linenumber" name="L1051" href="#L1051">1051</a> 
-<a class="jxr_linenumber" name="L1052" href="#L1052">1052</a>     @Test
-<a class="jxr_linenumber" name="L1053" href="#L1053">1053</a>     <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> testSqrtInf() {
-<a class="jxr_linenumber" name="L1054" href="#L1054">1054</a>         TestUtils.assertSame(infNaN, oneInf.sqrt());
-<a class="jxr_linenumber" name="L1055" href="#L1055">1055</a>         TestUtils.assertSame(infNaN, oneNegInf.sqrt());
-<a class="jxr_linenumber" name="L1056" href="#L1056">1056</a>         TestUtils.assertSame(infZero, infOne.sqrt());
-<a class="jxr_linenumber" name="L1057" href="#L1057">1057</a>         TestUtils.assertSame(zeroInf, negInfOne.sqrt());
-<a class="jxr_linenumber" name="L1058" href="#L1058">1058</a>         TestUtils.assertSame(infNaN, infInf.sqrt());
-<a class="jxr_linenumber" name="L1059" href="#L1059">1059</a>         TestUtils.assertSame(infNaN, infNegInf.sqrt());
-<a class="jxr_linenumber" name="L1060" href="#L1060">1060</a>         TestUtils.assertSame(nanInf, negInfInf.sqrt());
-<a class="jxr_linenumber" name="L1061" href="#L1061">1061</a>         TestUtils.assertSame(nanNegInf, negInfNegInf.sqrt());
-<a class="jxr_linenumber" name="L1062" href="#L1062">1062</a>     }
-<a class="jxr_linenumber" name="L1063" href="#L1063">1063</a> 
-<a class="jxr_linenumber" name="L1064" href="#L1064">1064</a>     @Test
-<a class="jxr_linenumber" name="L1065" href="#L1065">1065</a>     <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> testSqrt1z() {
-<a class="jxr_linenumber" name="L1066" href="#L1066">1066</a>         Complex z = <strong class="jxr_keyword">new</strong> Complex(3, 4);
-<a class="jxr_linenumber" name="L1067" href="#L1067">1067</a>         Complex expected = <strong class="jxr_keyword">new</strong> Complex(4.08033, -2.94094);
-<a class="jxr_linenumber" name="L1068" href="#L1068">1068</a>         TestUtils.assertEquals(expected, z.sqrt1z(), 1.0e-5);
-<a class="jxr_linenumber" name="L1069" href="#L1069">1069</a>     }
-<a class="jxr_linenumber" name="L1070" href="#L1070">1070</a> 
-<a class="jxr_linenumber" name="L1071" href="#L1071">1071</a>     @Test
-<a class="jxr_linenumber" name="L1072" href="#L1072">1072</a>     <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> testSqrt1zNaN() {
-<a class="jxr_linenumber" name="L1073" href="#L1073">1073</a>         Assert.assertTrue(Complex.NaN.sqrt1z().isNaN());
-<a class="jxr_linenumber" name="L1074" href="#L1074">1074</a>     }
-<a class="jxr_linenumber" name="L1075" href="#L1075">1075</a> 
-<a class="jxr_linenumber" name="L1076" href="#L1076">1076</a>     @Test
-<a class="jxr_linenumber" name="L1077" href="#L1077">1077</a>     <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> testTan() {
-<a class="jxr_linenumber" name="L1078" href="#L1078">1078</a>         Complex z = <strong class="jxr_keyword">new</strong> Complex(3, 4);
-<a class="jxr_linenumber" name="L1079" href="#L1079">1079</a>         Complex expected = <strong class="jxr_keyword">new</strong> Complex(-0.000187346, 0.999356);
-<a class="jxr_linenumber" name="L1080" href="#L1080">1080</a>         TestUtils.assertEquals(expected, z.tan(), 1.0e-5);
-<a class="jxr_linenumber" name="L1081" href="#L1081">1081</a>         <em class="jxr_comment">/* Check that no overflow occurs (MATH-722) */</em>
-<a class="jxr_linenumber" name="L1082" href="#L1082">1082</a>         Complex actual = <strong class="jxr_keyword">new</strong> Complex(3.0, 1E10).tan();
-<a class="jxr_linenumber" name="L1083" href="#L1083">1083</a>         expected = <strong class="jxr_keyword">new</strong> Complex(0, 1);
-<a class="jxr_linenumber" name="L1084" href="#L1084">1084</a>         TestUtils.assertEquals(expected, actual, 1.0e-5);
-<a class="jxr_linenumber" name="L1085" href="#L1085">1085</a>         actual = <strong class="jxr_keyword">new</strong> Complex(3.0, -1E10).tan();
-<a class="jxr_linenumber" name="L1086" href="#L1086">1086</a>         expected = <strong class="jxr_keyword">new</strong> Complex(0, -1);
-<a class="jxr_linenumber" name="L1087" href="#L1087">1087</a>         TestUtils.assertEquals(expected, actual, 1.0e-5);
-<a class="jxr_linenumber" name="L1088" href="#L1088">1088</a>     }
-<a class="jxr_linenumber" name="L1089" href="#L1089">1089</a> 
-<a class="jxr_linenumber" name="L1090" href="#L1090">1090</a>     @Test
-<a class="jxr_linenumber" name="L1091" href="#L1091">1091</a>     <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> testTanNaN() {
-<a class="jxr_linenumber" name="L1092" href="#L1092">1092</a>         Assert.assertTrue(Complex.NaN.tan().isNaN());
-<a class="jxr_linenumber" name="L1093" href="#L1093">1093</a>     }
-<a class="jxr_linenumber" name="L1094" href="#L1094">1094</a> 
-<a class="jxr_linenumber" name="L1095" href="#L1095">1095</a>     @Test
-<a class="jxr_linenumber" name="L1096" href="#L1096">1096</a>     <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> testTanInf() {
-<a class="jxr_linenumber" name="L1097" href="#L1097">1097</a>         TestUtils.assertSame(Complex.valueOf(0.0, 1.0), oneInf.tan());
-<a class="jxr_linenumber" name="L1098" href="#L1098">1098</a>         TestUtils.assertSame(Complex.valueOf(0.0, -1.0), oneNegInf.tan());
-<a class="jxr_linenumber" name="L1099" href="#L1099">1099</a>         TestUtils.assertSame(Complex.NaN, infOne.tan());
-<a class="jxr_linenumber" name="L1100" href="#L1100">1100</a>         TestUtils.assertSame(Complex.NaN, negInfOne.tan());
-<a class="jxr_linenumber" name="L1101" href="#L1101">1101</a>         TestUtils.assertSame(Complex.NaN, infInf.tan());
-<a class="jxr_linenumber" name="L1102" href="#L1102">1102</a>         TestUtils.assertSame(Complex.NaN, infNegInf.tan());
-<a class="jxr_linenumber" name="L1103" href="#L1103">1103</a>         TestUtils.assertSame(Complex.NaN, negInfInf.tan());
-<a class="jxr_linenumber" name="L1104" href="#L1104">1104</a>         TestUtils.assertSame(Complex.NaN, negInfNegInf.tan());
-<a class="jxr_linenumber" name="L1105" href="#L1105">1105</a>     }
-<a class="jxr_linenumber" name="L1106" href="#L1106">1106</a> 
-<a class="jxr_linenumber" name="L1107" href="#L1107">1107</a>    @Test
-<a class="jxr_linenumber" name="L1108" href="#L1108">1108</a>    <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> testTanCritical() {
-<a class="jxr_linenumber" name="L1109" href="#L1109">1109</a>         TestUtils.assertSame(infNaN, <strong class="jxr_keyword">new</strong> Complex(pi/2, 0).tan());
-<a class="jxr_linenumber" name="L1110" href="#L1110">1110</a>         TestUtils.assertSame(negInfNaN, <strong class="jxr_keyword">new</strong> Complex(-pi/2, 0).tan());
-<a class="jxr_linenumber" name="L1111" href="#L1111">1111</a>     }
-<a class="jxr_linenumber" name="L1112" href="#L1112">1112</a> 
-<a class="jxr_linenumber" name="L1113" href="#L1113">1113</a>     @Test
-<a class="jxr_linenumber" name="L1114" href="#L1114">1114</a>     <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> testTanh() {
-<a class="jxr_linenumber" name="L1115" href="#L1115">1115</a>         Complex z = <strong class="jxr_keyword">new</strong> Complex(3, 4);
-<a class="jxr_linenumber" name="L1116" href="#L1116">1116</a>         Complex expected = <strong class="jxr_keyword">new</strong> Complex(1.00071, 0.00490826);
-<a class="jxr_linenumber" name="L1117" href="#L1117">1117</a>         TestUtils.assertEquals(expected, z.tanh(), 1.0e-5);
-<a class="jxr_linenumber" name="L1118" href="#L1118">1118</a>         <em class="jxr_comment">/* Check that no overflow occurs (MATH-722) */</em>
-<a class="jxr_linenumber" name="L1119" href="#L1119">1119</a>         Complex actual = <strong class="jxr_keyword">new</strong> Complex(1E10, 3.0).tanh();
-<a class="jxr_linenumber" name="L1120" href="#L1120">1120</a>         expected = <strong class="jxr_keyword">new</strong> Complex(1, 0);
-<a class="jxr_linenumber" name="L1121" href="#L1121">1121</a>         TestUtils.assertEquals(expected, actual, 1.0e-5);
-<a class="jxr_linenumber" name="L1122" href="#L1122">1122</a>         actual = <strong class="jxr_keyword">new</strong> Complex(-1E10, 3.0).tanh();
-<a class="jxr_linenumber" name="L1123" href="#L1123">1123</a>         expected = <strong class="jxr_keyword">new</strong> Complex(-1, 0);
-<a class="jxr_linenumber" name="L1124" href="#L1124">1124</a>         TestUtils.assertEquals(expected, actual, 1.0e-5);
-<a class="jxr_linenumber" name="L1125" href="#L1125">1125</a>     }
-<a class="jxr_linenumber" name="L1126" href="#L1126">1126</a> 
-<a class="jxr_linenumber" name="L1127" href="#L1127">1127</a>     @Test
-<a class="jxr_linenumber" name="L1128" href="#L1128">1128</a>     <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> testTanhNaN() {
-<a class="jxr_linenumber" name="L1129" href="#L1129">1129</a>         Assert.assertTrue(Complex.NaN.tanh().isNaN());
-<a class="jxr_linenumber" name="L1130" href="#L1130">1130</a>     }
-<a class="jxr_linenumber" name="L1131" href="#L1131">1131</a> 
-<a class="jxr_linenumber" name="L1132" href="#L1132">1132</a>     @Test
-<a class="jxr_linenumber" name="L1133" href="#L1133">1133</a>     <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> testTanhInf() {
-<a class="jxr_linenumber" name="L1134" href="#L1134">1134</a>         TestUtils.assertSame(Complex.NaN, oneInf.tanh());
-<a class="jxr_linenumber" name="L1135" href="#L1135">1135</a>         TestUtils.assertSame(Complex.NaN, oneNegInf.tanh());
-<a class="jxr_linenumber" name="L1136" href="#L1136">1136</a>         TestUtils.assertSame(Complex.valueOf(1.0, 0.0), infOne.tanh());
-<a class="jxr_linenumber" name="L1137" href="#L1137">1137</a>         TestUtils.assertSame(Complex.valueOf(-1.0, 0.0), negInfOne.tanh());
-<a class="jxr_linenumber" name="L1138" href="#L1138">1138</a>         TestUtils.assertSame(Complex.NaN, infInf.tanh());
-<a class="jxr_linenumber" name="L1139" href="#L1139">1139</a>         TestUtils.assertSame(Complex.NaN, infNegInf.tanh());
-<a class="jxr_linenumber" name="L1140" href="#L1140">1140</a>         TestUtils.assertSame(Complex.NaN, negInfInf.tanh());
-<a class="jxr_linenumber" name="L1141" href="#L1141">1141</a>         TestUtils.assertSame(Complex.NaN, negInfNegInf.tanh());
-<a class="jxr_linenumber" name="L1142" href="#L1142">1142</a>     }
-<a class="jxr_linenumber" name="L1143" href="#L1143">1143</a> 
-<a class="jxr_linenumber" name="L1144" href="#L1144">1144</a>     @Test
-<a class="jxr_linenumber" name="L1145" href="#L1145">1145</a>     <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> testTanhCritical() {
-<a class="jxr_linenumber" name="L1146" href="#L1146">1146</a>         TestUtils.assertSame(nanInf, <strong class="jxr_keyword">new</strong> Complex(0, pi/2).tanh());
-<a class="jxr_linenumber" name="L1147" href="#L1147">1147</a>     }
-<a class="jxr_linenumber" name="L1148" href="#L1148">1148</a> 
-<a class="jxr_linenumber" name="L1149" href="#L1149">1149</a>     <em class="jxr_javadoccomment">/** test issue MATH-221 */</em>
-<a class="jxr_linenumber" name="L1150" href="#L1150">1150</a>     @Test
-<a class="jxr_linenumber" name="L1151" href="#L1151">1151</a>     <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> testMath221() {
-<a class="jxr_linenumber" name="L1152" href="#L1152">1152</a>         Assert.assertTrue(Complex.equals(<strong class="jxr_keyword">new</strong> Complex(0,-1),
-<a class="jxr_linenumber" name="L1153" href="#L1153">1153</a>                                          <strong class="jxr_keyword">new</strong> Complex(0,1).multiply(<strong class="jxr_keyword">new</strong> Complex(-1,0))));
-<a class="jxr_linenumber" name="L1154" href="#L1154">1154</a>     }
-<a class="jxr_linenumber" name="L1155" href="#L1155">1155</a> 
-<a class="jxr_linenumber" name="L1156" href="#L1156">1156</a>     <em class="jxr_javadoccomment">/**</em>
-<a class="jxr_linenumber" name="L1157" href="#L1157">1157</a> <em class="jxr_javadoccomment">     * Test: computing &lt;b&gt;third roots&lt;/b&gt; of z.</em>
-<a class="jxr_linenumber" name="L1158" href="#L1158">1158</a> <em class="jxr_javadoccomment">     * &lt;pre&gt;</em>
-<a class="jxr_linenumber" name="L1159" href="#L1159">1159</a> <em class="jxr_javadoccomment">     * &lt;code&gt;</em>
-<a class="jxr_linenumber" name="L1160" href="#L1160">1160</a> <em class="jxr_javadoccomment">     * &lt;b&gt;z = -2 + 2 * i&lt;/b&gt;</em>
-<a class="jxr_linenumber" name="L1161" href="#L1161">1161</a> <em class="jxr_javadoccomment">     *   =&gt; z_0 =  1      +          i</em>
-<a class="jxr_linenumber" name="L1162" href="#L1162">1162</a> <em class="jxr_javadoccomment">     *   =&gt; z_1 = -1.3660 + 0.3660 * i</em>
-<a class="jxr_linenumber" name="L1163" href="#L1163">1163</a> <em class="jxr_javadoccomment">     *   =&gt; z_2 =  0.3660 - 1.3660 * i</em>
-<a class="jxr_linenumber" name="L1164" href="#L1164">1164</a> <em class="jxr_javadoccomment">     * &lt;/code&gt;</em>
-<a class="jxr_linenumber" name="L1165" href="#L1165">1165</a> <em class="jxr_javadoccomment">     * &lt;/pre&gt;</em>
-<a class="jxr_linenumber" name="L1166" href="#L1166">1166</a> <em class="jxr_javadoccomment">     */</em>
-<a class="jxr_linenumber" name="L1167" href="#L1167">1167</a>     @Test
-<a class="jxr_linenumber" name="L1168" href="#L1168">1168</a>     <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> testNthRoot_normal_thirdRoot() {
-<a class="jxr_linenumber" name="L1169" href="#L1169">1169</a>         <em class="jxr_comment">// The complex number we want to compute all third-roots for.</em>
-<a class="jxr_linenumber" name="L1170" href="#L1170">1170</a>         Complex z = <strong class="jxr_keyword">new</strong> Complex(-2,2);
-<a class="jxr_linenumber" name="L1171" href="#L1171">1171</a>         <em class="jxr_comment">// The List holding all third roots</em>
-<a class="jxr_linenumber" name="L1172" href="#L1172">1172</a>         Complex[] thirdRootsOfZ = z.nthRoot(3).toArray(<strong class="jxr_keyword">new</strong> Complex[0]);
-<a class="jxr_linenumber" name="L1173" href="#L1173">1173</a>         <em class="jxr_comment">// Returned Collection must not be empty!</em>
-<a class="jxr_linenumber" name="L1174" href="#L1174">1174</a>         Assert.assertEquals(3, thirdRootsOfZ.length);
-<a class="jxr_linenumber" name="L1175" href="#L1175">1175</a>         <em class="jxr_comment">// test z_0</em>
-<a class="jxr_linenumber" name="L1176" href="#L1176">1176</a>         Assert.assertEquals(1.0,                  thirdRootsOfZ[0].getReal(),      1.0e-5);
-<a class="jxr_linenumber" name="L1177" href="#L1177">1177</a>         Assert.assertEquals(1.0,                  thirdRootsOfZ[0].getImaginary(), 1.0e-5);
-<a class="jxr_linenumber" name="L1178" href="#L1178">1178</a>         <em class="jxr_comment">// test z_1</em>
-<a class="jxr_linenumber" name="L1179" href="#L1179">1179</a>         Assert.assertEquals(-1.3660254037844386,  thirdRootsOfZ[1].getReal(),      1.0e-5);
-<a class="jxr_linenumber" name="L1180" href="#L1180">1180</a>         Assert.assertEquals(0.36602540378443843,  thirdRootsOfZ[1].getImaginary(), 1.0e-5);
-<a class="jxr_linenumber" name="L1181" href="#L1181">1181</a>         <em class="jxr_comment">// test z_2</em>
-<a class="jxr_linenumber" name="L1182" href="#L1182">1182</a>         Assert.assertEquals(0.366025403784439,    thirdRootsOfZ[2].getReal(),      1.0e-5);
-<a class="jxr_linenumber" name="L1183" href="#L1183">1183</a>         Assert.assertEquals(-1.3660254037844384,  thirdRootsOfZ[2].getImaginary(), 1.0e-5);
-<a class="jxr_linenumber" name="L1184" href="#L1184">1184</a>     }
-<a class="jxr_linenumber" name="L1185" href="#L1185">1185</a> 
-<a class="jxr_linenumber" name="L1186" href="#L1186">1186</a> 
-<a class="jxr_linenumber" name="L1187" href="#L1187">1187</a>     <em class="jxr_javadoccomment">/**</em>
-<a class="jxr_linenumber" name="L1188" href="#L1188">1188</a> <em class="jxr_javadoccomment">     * Test: computing &lt;b&gt;fourth roots&lt;/b&gt; of z.</em>
-<a class="jxr_linenumber" name="L1189" href="#L1189">1189</a> <em class="jxr_javadoccomment">     * &lt;pre&gt;</em>
-<a class="jxr_linenumber" name="L1190" href="#L1190">1190</a> <em class="jxr_javadoccomment">     * &lt;code&gt;</em>
-<a class="jxr_linenumber" name="L1191" href="#L1191">1191</a> <em class="jxr_javadoccomment">     * &lt;b&gt;z = 5 - 2 * i&lt;/b&gt;</em>
-<a class="jxr_linenumber" name="L1192" href="#L1192">1192</a> <em class="jxr_javadoccomment">     *   =&gt; z_0 =  1.5164 - 0.1446 * i</em>
-<a class="jxr_linenumber" name="L1193" href="#L1193">1193</a> <em class="jxr_javadoccomment">     *   =&gt; z_1 =  0.1446 + 1.5164 * i</em>
-<a class="jxr_linenumber" name="L1194" href="#L1194">1194</a> <em class="jxr_javadoccomment">     *   =&gt; z_2 = -1.5164 + 0.1446 * i</em>
-<a class="jxr_linenumber" name="L1195" href="#L1195">1195</a> <em class="jxr_javadoccomment">     *   =&gt; z_3 = -1.5164 - 0.1446 * i</em>
-<a class="jxr_linenumber" name="L1196" href="#L1196">1196</a> <em class="jxr_javadoccomment">     * &lt;/code&gt;</em>
-<a class="jxr_linenumber" name="L1197" href="#L1197">1197</a> <em class="jxr_javadoccomment">     * &lt;/pre&gt;</em>
-<a class="jxr_linenumber" name="L1198" href="#L1198">1198</a> <em class="jxr_javadoccomment">     */</em>
-<a class="jxr_linenumber" name="L1199" href="#L1199">1199</a>     @Test
-<a class="jxr_linenumber" name="L1200" href="#L1200">1200</a>     <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> testNthRoot_normal_fourthRoot() {
-<a class="jxr_linenumber" name="L1201" href="#L1201">1201</a>         <em class="jxr_comment">// The complex number we want to compute all third-roots for.</em>
-<a class="jxr_linenumber" name="L1202" href="#L1202">1202</a>         Complex z = <strong class="jxr_keyword">new</strong> Complex(5,-2);
-<a class="jxr_linenumber" name="L1203" href="#L1203">1203</a>         <em class="jxr_comment">// The List holding all fourth roots</em>
-<a class="jxr_linenumber" name="L1204" href="#L1204">1204</a>         Complex[] fourthRootsOfZ = z.nthRoot(4).toArray(<strong class="jxr_keyword">new</strong> Complex[0]);
-<a class="jxr_linenumber" name="L1205" href="#L1205">1205</a>         <em class="jxr_comment">// Returned Collection must not be empty!</em>
-<a class="jxr_linenumber" name="L1206" href="#L1206">1206</a>         Assert.assertEquals(4, fourthRootsOfZ.length);
-<a class="jxr_linenumber" name="L1207" href="#L1207">1207</a>         <em class="jxr_comment">// test z_0</em>
-<a class="jxr_linenumber" name="L1208" href="#L1208">1208</a>         Assert.assertEquals(1.5164629308487783,     fourthRootsOfZ[0].getReal(),      1.0e-5);
-<a class="jxr_linenumber" name="L1209" href="#L1209">1209</a>         Assert.assertEquals(-0.14469266210702247,   fourthRootsOfZ[0].getImaginary(), 1.0e-5);
-<a class="jxr_linenumber" name="L1210" href="#L1210">1210</a>         <em class="jxr_comment">// test z_1</em>
-<a class="jxr_linenumber" name="L1211" href="#L1211">1211</a>         Assert.assertEquals(0.14469266210702256,    fourthRootsOfZ[1].getReal(),      1.0e-5);
-<a class="jxr_linenumber" name="L1212" href="#L1212">1212</a>         Assert.assertEquals(1.5164629308487783,     fourthRootsOfZ[1].getImaginary(), 1.0e-5);
-<a class="jxr_linenumber" name="L1213" href="#L1213">1213</a>         <em class="jxr_comment">// test z_2</em>
-<a class="jxr_linenumber" name="L1214" href="#L1214">1214</a>         Assert.assertEquals(-1.5164629308487783,    fourthRootsOfZ[2].getReal(),      1.0e-5);
-<a class="jxr_linenumber" name="L1215" href="#L1215">1215</a>         Assert.assertEquals(0.14469266210702267,    fourthRootsOfZ[2].getImaginary(), 1.0e-5);
-<a class="jxr_linenumber" name="L1216" href="#L1216">1216</a>         <em class="jxr_comment">// test z_3</em>
-<a class="jxr_linenumber" name="L1217" href="#L1217">1217</a>         Assert.assertEquals(-0.14469266210702275,   fourthRootsOfZ[3].getReal(),      1.0e-5);
-<a class="jxr_linenumber" name="L1218" href="#L1218">1218</a>         Assert.assertEquals(-1.5164629308487783,    fourthRootsOfZ[3].getImaginary(), 1.0e-5);
-<a class="jxr_linenumber" name="L1219" href="#L1219">1219</a>     }
-<a class="jxr_linenumber" name="L1220" href="#L1220">1220</a> 
-<a class="jxr_linenumber" name="L1221" href="#L1221">1221</a>     <em class="jxr_javadoccomment">/**</em>
-<a class="jxr_linenumber" name="L1222" href="#L1222">1222</a> <em class="jxr_javadoccomment">     * Test: computing &lt;b&gt;third roots&lt;/b&gt; of z.</em>
-<a class="jxr_linenumber" name="L1223" href="#L1223">1223</a> <em class="jxr_javadoccomment">     * &lt;pre&gt;</em>
-<a class="jxr_linenumber" name="L1224" href="#L1224">1224</a> <em class="jxr_javadoccomment">     * &lt;code&gt;</em>
-<a class="jxr_linenumber" name="L1225" href="#L1225">1225</a> <em class="jxr_javadoccomment">     * &lt;b&gt;z = 8&lt;/b&gt;</em>
-<a class="jxr_linenumber" name="L1226" href="#L1226">1226</a> <em class="jxr_javadoccomment">     *   =&gt; z_0 =  2</em>
-<a class="jxr_linenumber" name="L1227" href="#L1227">1227</a> <em class="jxr_javadoccomment">     *   =&gt; z_1 = -1 + 1.73205 * i</em>
-<a class="jxr_linenumber" name="L1228" href="#L1228">1228</a> <em class="jxr_javadoccomment">     *   =&gt; z_2 = -1 - 1.73205 * i</em>
-<a class="jxr_linenumber" name="L1229" href="#L1229">1229</a> <em class="jxr_javadoccomment">     * &lt;/code&gt;</em>
-<a class="jxr_linenumber" name="L1230" href="#L1230">1230</a> <em class="jxr_javadoccomment">     * &lt;/pre&gt;</em>
-<a class="jxr_linenumber" name="L1231" href="#L1231">1231</a> <em class="jxr_javadoccomment">     */</em>
-<a class="jxr_linenumber" name="L1232" href="#L1232">1232</a>     @Test
-<a class="jxr_linenumber" name="L1233" href="#L1233">1233</a>     <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> testNthRoot_cornercase_thirdRoot_imaginaryPartEmpty() {
-<a class="jxr_linenumber" name="L1234" href="#L1234">1234</a>         <em class="jxr_comment">// The number 8 has three third roots. One we all already know is the number 2.</em>
-<a class="jxr_linenumber" name="L1235" href="#L1235">1235</a>         <em class="jxr_comment">// But there are two more complex roots.</em>
-<a class="jxr_linenumber" name="L1236" href="#L1236">1236</a>         Complex z = <strong class="jxr_keyword">new</strong> Complex(8,0);
-<a class="jxr_linenumber" name="L1237" href="#L1237">1237</a>         <em class="jxr_comment">// The List holding all third roots</em>
-<a class="jxr_linenumber" name="L1238" href="#L1238">1238</a>         Complex[] thirdRootsOfZ = z.nthRoot(3).toArray(<strong class="jxr_keyword">new</strong> Complex[0]);
-<a class="jxr_linenumber" name="L1239" href="#L1239">1239</a>         <em class="jxr_comment">// Returned Collection must not be empty!</em>
-<a class="jxr_linenumber" name="L1240" href="#L1240">1240</a>         Assert.assertEquals(3, thirdRootsOfZ.length);
-<a class="jxr_linenumber" name="L1241" href="#L1241">1241</a>         <em class="jxr_comment">// test z_0</em>
-<a class="jxr_linenumber" name="L1242" href="#L1242">1242</a>         Assert.assertEquals(2.0,                thirdRootsOfZ[0].getReal(),      1.0e-5);
-<a class="jxr_linenumber" name="L1243" href="#L1243">1243</a>         Assert.assertEquals(0.0,                thirdRootsOfZ[0].getImaginary(), 1.0e-5);
-<a class="jxr_linenumber" name="L1244" href="#L1244">1244</a>         <em class="jxr_comment">// test z_1</em>
-<a class="jxr_linenumber" name="L1245" href="#L1245">1245</a>         Assert.assertEquals(-1.0,               thirdRootsOfZ[1].getReal(),      1.0e-5);
-<a class="jxr_linenumber" name="L1246" href="#L1246">1246</a>         Assert.assertEquals(1.7320508075688774, thirdRootsOfZ[1].getImaginary(), 1.0e-5);
-<a class="jxr_linenumber" name="L1247" href="#L1247">1247</a>         <em class="jxr_comment">// test z_2</em>
-<a class="jxr_linenumber" name="L1248" href="#L1248">1248</a>         Assert.assertEquals(-1.0,               thirdRootsOfZ[2].getReal(),      1.0e-5);
-<a class="jxr_linenumber" name="L1249" href="#L1249">1249</a>         Assert.assertEquals(-1.732050807568877, thirdRootsOfZ[2].getImaginary(), 1.0e-5);
-<a class="jxr_linenumber" name="L1250" href="#L1250">1250</a>     }
-<a class="jxr_linenumber" name="L1251" href="#L1251">1251</a> 
-<a class="jxr_linenumber" name="L1252" href="#L1252">1252</a> 
-<a class="jxr_linenumber" name="L1253" href="#L1253">1253</a>     <em class="jxr_javadoccomment">/**</em>
-<a class="jxr_linenumber" name="L1254" href="#L1254">1254</a> <em class="jxr_javadoccomment">     * Test: computing &lt;b&gt;third roots&lt;/b&gt; of z with real part 0.</em>
-<a class="jxr_linenumber" name="L1255" href="#L1255">1255</a> <em class="jxr_javadoccomment">     * &lt;pre&gt;</em>
-<a class="jxr_linenumber" name="L1256" href="#L1256">1256</a> <em class="jxr_javadoccomment">     * &lt;code&gt;</em>
-<a class="jxr_linenumber" name="L1257" href="#L1257">1257</a> <em class="jxr_javadoccomment">     * &lt;b&gt;z = 2 * i&lt;/b&gt;</em>
-<a class="jxr_linenumber" name="L1258" href="#L1258">1258</a> <em class="jxr_javadoccomment">     *   =&gt; z_0 =  1.0911 + 0.6299 * i</em>
-<a class="jxr_linenumber" name="L1259" href="#L1259">1259</a> <em class="jxr_javadoccomment">     *   =&gt; z_1 = -1.0911 + 0.6299 * i</em>
-<a class="jxr_linenumber" name="L1260" href="#L1260">1260</a> <em class="jxr_javadoccomment">     *   =&gt; z_2 = -2.3144 - 1.2599 * i</em>
-<a class="jxr_linenumber" name="L1261" href="#L1261">1261</a> <em class="jxr_javadoccomment">     * &lt;/code&gt;</em>
-<a class="jxr_linenumber" name="L1262" href="#L1262">1262</a> <em class="jxr_javadoccomment">     * &lt;/pre&gt;</em>
-<a class="jxr_linenumber" name="L1263" href="#L1263">1263</a> <em class="jxr_javadoccomment">     */</em>
-<a class="jxr_linenumber" name="L1264" href="#L1264">1264</a>     @Test
-<a class="jxr_linenumber" name="L1265" href="#L1265">1265</a>     <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">void</strong> testNthRoot_cornercase_thirdRoot_realPartZero() {
-<a class="jxr_linenumber" name="L1266" href="#L1266">1266</a>         <em class="jxr_comment">// complex number with only imaginary part</em>
-<a class="jxr_linenumber" name="L1267" href="#L1267">1267</a>         Complex z = <strong class="jxr_keyword">new</strong> Complex(0,2);
-<a class="jxr_linenumber" name="L1268" href="#L1268">1268</a>         <em class="jxr_comment">// The List holding all third roots</em>
-<a class="jxr_linenumber" name="L1269" href="#L1269">1269</a>         Complex[] thirdRootsOfZ = z.nthRoot(3).toArray(<strong class="jxr_keyword">new</strong> Complex[0]);
-<a class="jxr_linenumber" name="L1270" href="#L1270">1270</a>         <em class="jxr_comment">// Returned Collection must not be empty!</em>
-<a class="jxr_linenumber" name="L1271" href="#L1271">1271</a>         Assert.assertEquals(3, thirdRootsOfZ.length);
-<a class="jxr_linenumber" name="L1272" href="#L1272">1272</a>         <em class="jxr_comment">// test z_0</em>
-<a class="jxr_linenumber" name="L1273" href="#L1273">1273</a>         Assert.assertEquals(1.0911236359717216,      thirdRootsOfZ[0].getReal(),      1.0e-5);
-<a class="jxr_linenumber" name="L1274" href="#L1274">1274</a>         Assert.assertEquals(0.6299605249474365,      thirdRootsOfZ[0].getImaginary(), 1.0e-5);
-<a class="jxr_linenumber" name="L1275" href="#L1275">1275</a>         <em class="jxr_comment">// test z_1</em>
-<a class="jxr_linenumber" name="L1276" href="#L1276">1276</a>         Assert.assertEquals(-1.0911236359717216,     thirdRootsOfZ[1].getReal(),      1.0e-5);
-<a class="jxr_linenumber" name="L1277" href="#L1277">1277</a>         Assert.assertEquals(0.6299605249474365,      thirdRootsOfZ[1].getImaginary(), 1.0e-5);
-<a class="jxr_linenumber" name="L1278" href="#L1278">1278</a>         <em class="jxr_comment">// test z_2</em>
-<a class="jxr_linenumber" name="L1279" href="#L1279">1279</a>         Assert.assertEquals(-2.3144374213981936E-16, thirdRootsOfZ[2].getReal(),      1.0e-5);
-<a class="jxr_linenumber" name="L1280" href="#L1280">1280</a>         Assert.assertEquals(-1.2599210498948732,     thirdRootsOfZ[2].getImaginary(), 1.0e-5);
-<a class="jxr_linenumber" name="L1281" href="#L1281">1281</a>     }
-<a class="jxr_linenumber" name="L1282" href="#L1282">1282</a> 
-<a class="jxr_linenumber" name="L1283" href="#L1283">1283</a>     <em class="jxr_javadoccomment">/**</em>

[... 589 lines stripped ...]


Mime
View raw message