This is an automated email from the ASF dual-hosted git repository. erans pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/commons-numbers.git
commit 37e221a79e2a78a99130ae0602c295c45d50ca10 Author: Gilles Sadowski <[email protected]> AuthorDate: Thu Oct 3 16:20:46 2019 +0200 Unit tests. --- .../org/apache/commons/numbers/complex/ComplexTest.java | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/commons-numbers-complex/src/test/java/org/apache/commons/numbers/complex/ComplexTest.java b/commons-numbers-complex/src/test/java/org/apache/commons/numbers/complex/ComplexTest.java index be763f9..c554313 100644 --- a/commons-numbers-complex/src/test/java/org/apache/commons/numbers/complex/ComplexTest.java +++ b/commons-numbers-complex/src/test/java/org/apache/commons/numbers/complex/ComplexTest.java @@ -587,6 +587,23 @@ public class ComplexTest { } @Test + public void testScalarPowZeroBaseZeroExponent() { + Complex x = Complex.ZERO; + double yDouble = 0; + Assertions.assertEquals(NAN, x.pow(yDouble)); + Complex yComplex = Complex.ofReal(yDouble); + Assertions.assertEquals(NAN, x.pow(yComplex)); + } + @Test + public void testScalarPowZeroBasePositiveExponent() { + Complex x = Complex.ZERO; + double yDouble = Double.MIN_VALUE; + Assertions.assertEquals(Complex.ZERO, x.pow(yDouble)); + Complex yComplex = Complex.ofReal(yDouble); + Assertions.assertEquals(Complex.ZERO, x.pow(yComplex)); + } + + @Test public void testScalarPowNaNExponent() { Complex x = Complex.ofCartesian(3, 4); double yDouble = Double.NaN;
