Ejemplo n.º 1
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void testAtanh()
        public virtual void testAtanh()
        {
            double        x    = 0.76;
            ComplexNumber z    = new ComplexNumber(x);
            double        real = 0.5 * Math.Log((1 + x) / (1 - x));
            ComplexNumber res  = TrigonometricFunctionUtils.atanh(z);

            assertEquals(real, res.Real, 1e-15);
            assertEquals(0.0, res.Imaginary, 0);
        }
Ejemplo n.º 2
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void test()
        public virtual void test()
        {
            assertEquals(TrigonometricFunctionUtils.acos(TrigonometricFunctionUtils.cos(X)), X, EPS);
            assertEquals(TrigonometricFunctionUtils.asin(TrigonometricFunctionUtils.sin(X)), X, EPS);
            assertEquals(TrigonometricFunctionUtils.atan(TrigonometricFunctionUtils.tan(X)), X, EPS);
            assertComplexEquals(TrigonometricFunctionUtils.cos(Y), Math.Cos(X));
            assertComplexEquals(TrigonometricFunctionUtils.sin(Y), Math.Sin(X));
            assertComplexEquals(TrigonometricFunctionUtils.tan(Y), Math.Tan(X));
            assertComplexEquals(TrigonometricFunctionUtils.acos(Y), Math.Acos(X));
            assertComplexEquals(TrigonometricFunctionUtils.asin(Y), Math.Asin(X));
            assertComplexEquals(TrigonometricFunctionUtils.atan(Y), Math.Atan(X));
            assertComplexEquals(TrigonometricFunctionUtils.acos(TrigonometricFunctionUtils.cos(Z)), Z);
            assertComplexEquals(TrigonometricFunctionUtils.asin(TrigonometricFunctionUtils.sin(Z)), Z);
            assertComplexEquals(TrigonometricFunctionUtils.atan(TrigonometricFunctionUtils.tan(Z)), Z);
            assertEquals(TrigonometricFunctionUtils.acosh(TrigonometricFunctionUtils.cosh(X)), X, EPS);
            assertEquals(TrigonometricFunctionUtils.asinh(TrigonometricFunctionUtils.sinh(X)), X, EPS);
            assertEquals(TrigonometricFunctionUtils.atanh(TrigonometricFunctionUtils.tanh(X)), X, EPS);
            assertComplexEquals(TrigonometricFunctionUtils.acosh(TrigonometricFunctionUtils.cosh(Z)), Z);
            assertComplexEquals(TrigonometricFunctionUtils.asinh(TrigonometricFunctionUtils.sinh(Z)), Z);
            assertComplexEquals(TrigonometricFunctionUtils.atanh(TrigonometricFunctionUtils.tanh(Z)), Z);
        }
Ejemplo n.º 3
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test(expectedExceptions = IllegalArgumentException.class) public void testNull11()
        public virtual void testNull11()
        {
            TrigonometricFunctionUtils.tan(null);
        }
Ejemplo n.º 4
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test(expectedExceptions = IllegalArgumentException.class) public void testNull10()
        public virtual void testNull10()
        {
            TrigonometricFunctionUtils.sinh(null);
        }
Ejemplo n.º 5
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test(expectedExceptions = IllegalArgumentException.class) public void testNull8()
        public virtual void testNull8()
        {
            TrigonometricFunctionUtils.cosh(null);
        }
Ejemplo n.º 6
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test(expectedExceptions = IllegalArgumentException.class) public void testNull6()
        public virtual void testNull6()
        {
            TrigonometricFunctionUtils.atanh(null);
        }
Ejemplo n.º 7
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test(expectedExceptions = IllegalArgumentException.class) public void testNull3()
        public virtual void testNull3()
        {
            TrigonometricFunctionUtils.asin(null);
        }