Beispiel #1
0
        public static ComplexD Sum(Func <int, ComplexD> series, int beginning, int end)
        {
            ComplexD sum = 0;

            for (int i = beginning; i <= end; i++)
            {
                sum += series(i);
            }

            return(sum);
        }
Beispiel #2
0
        public static ComplexD Product(Func <int, ComplexD> series, int beginning, int end)
        {
            ComplexD product = 1;

            for (int i = beginning; i <= end; i++)
            {
                product *= series(i);
            }

            return(product);
        }
Beispiel #3
0
 public static ComplexD Sqrt(ComplexD z) => Pow(z, 0.5);
Beispiel #4
0
 public static ComplexD Sinh(ComplexD z) => (Exp(z) - Exp(-z)) / 2;
Beispiel #5
0
 public static ComplexD Sin(ComplexD z) => (Exp(II * z) - Exp(-II * z)) / (2 * II);
Beispiel #6
0
 public static ComplexD Sigm(ComplexD z) => 1 / (1 + Exp(-z));
Beispiel #7
0
 public static ComplexD Acos(ComplexD z) => - II * Log(z + Sqrt(Pow(z, 2) - 1));
Beispiel #8
0
 public static ComplexD Log(ComplexD z) => M.Log(z.Magnitude) + II * z.Phase;
Beispiel #9
0
 public static ComplexD Log(ComplexD z, ComplexD b) => Log(z) / Log(b);
Beispiel #10
0
 public static ComplexD Cosh(ComplexD z) => (Exp(z) + Exp(-z)) / 2;
Beispiel #11
0
 public static ComplexD Exp(ComplexD z) => M.Exp(z.Re) * (M.Cos(z.Im) + II * M.Sin(z.Im));
Beispiel #12
0
 public static ComplexD Cos(ComplexD z) => (Exp(II * z) + Exp(-II * z)) / 2;
Beispiel #13
0
 public static ComplexD Atan(ComplexD z) => II / 2 * (Log(1 - II * z) - Log(1 + II * z));
Beispiel #14
0
 public static ComplexD Asin(ComplexD z) => - II * Log(II * z + Sqrt(1 - Pow(z, 2)));
Beispiel #15
0
 public static ComplexD Tan(ComplexD z) => Sin(z) / Cos(z);
Beispiel #16
0
 public static ComplexD Pow(ComplexD z, ComplexD b) => Exp(Log(z) * b);
Beispiel #17
0
 public static ComplexD Tanh(ComplexD z) => Sinh(z) / Cosh(z);
Beispiel #18
0
 public static double Abs(ComplexD z) => z.Magnitude;