Example #1
0
        public void ExecuteComplexNumberTest()
        {
            var complex = new Complex(3, 2);
            var exp     = new Arcsch(new ComplexNumber(complex));
            var result  = (Complex)exp.Execute();

            Assert.Equal(ComplexExtensions.Acsch(complex), result);
            Assert.Equal(0.23133469857397318, result.Real, 15);
            Assert.Equal(-0.15038560432786197, result.Imaginary, 15);
        }
Example #2
0
        public void ExecuteTestException()
        {
            var exp = new Arcsch(new Bool(false));

            Assert.Throws <ResultIsNotSupportedException>(() => exp.Execute());
        }
Example #3
0
        public void ExecuteDegreeTest()
        {
            var exp = new Arcsch(new Number(0.5));

            Assert.Equal(MathExtensions.Acsch(0.5) / Math.PI * 180, exp.Execute(AngleMeasurement.Degree));
        }
Example #4
0
        public void ExecuteGradianTest()
        {
            var exp = new Arcsch(new Number(0.5));

            Assert.Equal(MathExtensions.Acsch(0.5) / Math.PI * 200, exp.Execute(AngleMeasurement.Gradian));
        }
Example #5
0
        public void ExecuteTest()
        {
            var exp = new Arcsch(new Number(1));

            Assert.Equal(MathExtensions.Acsch(1), exp.Execute());
        }