@Test
    public void testPolar() {
        System.out.println("Polar");

        assertEquals(Complex.NaN, Complex.Polar(Double.NaN, Double.NaN));
        assertEquals(Complex.NaN, Complex.Polar(Double.NaN, 1.0));
        assertEquals(Complex.NaN, Complex.Polar(1.0, Double.NaN));

        assertEquals(Complex.Infinity, Complex.Polar(Double.POSITIVE_INFINITY, Double.NaN));
        assertEquals(Complex.Infinity, Complex.Polar(Double.POSITIVE_INFINITY, Double.POSITIVE_INFINITY));
        assertEquals(Complex.Infinity, Complex.Polar(Double.POSITIVE_INFINITY, Double.NEGATIVE_INFINITY));
        assertEquals(Complex.Infinity, Complex.Polar(Double.POSITIVE_INFINITY, 1.0));
        assertEquals(Complex.NaN, Complex.Polar(1.0, Double.POSITIVE_INFINITY));

        for (int i = -5; i < 6; i++)
            assertTrue("Failed creating of Complex real unit for rotations: " +
                    Integer.toString(i),
                    this._numericalComparer.value(
                    Complex.Cartesian(1.0, 0.0), Complex.Polar(1.0, 2.0*Math.PI*i)));

         for (int i = -5; i < 6; i++)
            assertTrue("Failed creating of Complex negative real unit for rotations: " +
                    Integer.toString(i),
                    this._numericalComparer.value(
                    Complex.Cartesian(-1.0, 0.0), Complex.Polar(1.0, 2.0*Math.PI*i + Math.PI)));

        for (int i = -5; i < 6; i++)
            assertTrue("Failed creating of Complex imaginary unit for rotations: " +
                    Integer.toString(i),
                    this._numericalComparer.value(
                    Complex.Cartesian(0.0, 1.0), Complex.Polar(1.0, 2.0*Math.PI*i + Math.PI/2.0)));

        for (int i = -5; i < 6; i++)
            assertTrue("Failed creating of Complex negative imaginary unit for rotations: " +
                    Integer.toString(i),
                    this._numericalComparer.value(
                    Complex.Cartesian(0.0, -1.0), Complex.Polar(1.0, 2.0*Math.PI*i - Math.PI/2.0)));

        Complex tri = Complex.Cartesian(3.0, -4.0);

        for (int i = -5; i < 6; i++)
            assertTrue("Failed creating of Compex value " + tri.toString() +
                    " for rotations: " + Integer.toString(i),
                    this._numericalComparer.value(
                    tri, Complex.Polar(5.0, -0.9272952180016121 + 2.0*Math.PI*i)));
    }