Esempio 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);
        }
Esempio 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);
        }
Esempio 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 testNull6()
        public virtual void testNull6()
        {
            TrigonometricFunctionUtils.atanh(null);
        }