Esempio n. 1
0
        public void TestCosh()
        {
            double d = 0;

            d = MathX.Cosh(0);
            AssertEquals("cosh 0", 1, d);

            d = MathX.Cosh(1);
            AssertEquals("cosh 1 ", 1.543080635, d);

            d = MathX.Cosh(-1);
            AssertEquals("cosh -1 ", 1.543080635, d);

            d = MathX.Cosh(-100);
            AssertEquals("cosh -100 ", 1.344058570908070E+43, d);

            d = MathX.Cosh(100);
            AssertEquals("cosh 100 ", 1.344058570908070E+43, d);

            d = MathX.Cosh(15);
            AssertEquals("cosh 15", 1634508.686, d);

            d = MathX.Cosh(-15);
            AssertEquals("cosh -15 ", 1634508.686, d);

            d = MathX.Cosh(0.1);
            AssertEquals("cosh 0.1", 1.005004168, d);

            d = MathX.Cosh(-0.1);
            AssertEquals("cosh -0.1 ", 1.005004168, d);
        }