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

            Assert.Equal(ComplexExtensions.Coth(complex), result);
            Assert.Equal(0.99675779656935837, result.Real, 15);
            Assert.Equal(0.0037397103763368955, result.Imaginary, 15);
        }
예제 #2
0
        public void ExecuteTest()
        {
            var exp = new Coth(new Number(1));

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