System.Numerics.Tests.ComplexTests.Tan_Basic C# (CSharp) Method

Tan_Basic() private method

private Tan_Basic ( double real, double imaginary ) : void
real double
imaginary double
return void
        public static void Tan_Basic(double real, double imaginary)
        {
            double scale = Math.Cosh(2 * imaginary);
            if (!double.IsInfinity(scale))
            {
                scale += Math.Cos(2 * real);
            }
            double expectedReal = Math.Sin(2 * real) / scale;
            double expectedImaginary = Math.Sinh(2 * imaginary) / scale;

            if (double.IsNaN(expectedImaginary))
            {
                expectedReal = double.NaN;
            }
            Tan_Advanced(real, imaginary, expectedReal, expectedImaginary);
        }
ComplexTests