コード例 #1
0
ファイル: Trigonometry.cs プロジェクト: jxz12/EcoBuilder
        /// <summary>
        /// Trigonometric principal Arc Cosine of this <c>Complex</c> number.
        /// </summary>
        /// <param name="value">The complex value.</param>
        /// <returns>The arc cosine of a complex number.</returns>
        public static Complex Acos(this Complex value)
        {
            if (value.Imaginary < 0 || value.Imaginary == 0d && value.Real > 0)
            {
                return(Constants.Pi - Acos(-value));
            }

            return(-Complex.ImaginaryOne * (value + (Complex.ImaginaryOne * (1 - value.Square()).SquareRoot())).Ln());
        }
コード例 #2
0
ファイル: Trigonometry.cs プロジェクト: jxz12/EcoBuilder
        /// <summary>
        /// Trigonometric principal Arc Sine of this <c>Complex</c> number.
        /// </summary>
        /// <param name="value">The complex value.</param>
        /// <returns>The arc sine of a complex number.</returns>
        public static Complex Asin(this Complex value)
        {
            if (value.Imaginary > 0 || value.Imaginary == 0d && value.Real < 0)
            {
                return(-Asin(-value));
            }

            return(-Complex.ImaginaryOne * ((1 - value.Square()).SquareRoot() + (Complex.ImaginaryOne * value)).Ln());
        }
コード例 #3
0
ファイル: Complex.cs プロジェクト: Nightrain/paz-search
        /// <summary>Trigonometric Hyperbolic Cosecant (Cosecans hyperbolicus) of this <c>Complex</c>.</summary>
        public Complex Csch()
        {
            if (IsReal)
            {
                return(new Complex(Trig.Csch(real), 0d));
            }
            Complex exp = this.Exp();

            return(2 * exp / (exp.Square() - 1));
        }
コード例 #4
0
 /// <summary>
 /// Trigonometric Arc Sine of this <c>Complex</c> number.
 /// </summary>
 /// <param name="value">
 /// The complex value.
 /// </param>
 /// <returns>
 /// The arc sine of a complex number.
 /// </returns>
 public static Complex InverseSine(this Complex value)
 {
     return(-Complex.ImaginaryOne * ((1 - value.Square()).SquareRoot() + (Complex.ImaginaryOne * value)).NaturalLogarithm());
 }
コード例 #5
0
 /// <summary>
 /// Trigonometric Hyperbolic Arc Sine of this <c>Complex</c> number.
 /// </summary>
 /// <param name="value">
 /// The complex value.
 /// </param>
 /// <returns>
 /// The hyperbolic arc sine of a complex number.
 /// </returns>
 public static Complex InverseHyperbolicSine(this Complex value)
 {
     return((value + (value.Square() + 1).SquareRoot()).NaturalLogarithm());
 }
コード例 #6
0
ファイル: Complex.cs プロジェクト: Nightrain/paz-search
        /// <summary>Trigonometric Hyperbolic Area Cosecant (Areacosekans hyperbolicus) of this <c>Complex</c>.</summary>
        public Complex Acsch()
        {
            Complex inv = 1 / this;

            return((inv + (inv.Square() + 1).Sqrt()).Ln());
        }
コード例 #7
0
ファイル: Complex.cs プロジェクト: Nightrain/paz-search
        /// <summary>Trigonometric Arcus Cosecant (Arkuscosekans) of this <c>Complex</c>.</summary>
        public Complex Acsc()
        {
            Complex inv = 1 / this;

            return(-Complex.I * (Complex.I * inv + (1 - inv.Square()).Sqrt()).Ln());
        }
コード例 #8
0
ファイル: Complex.cs プロジェクト: Nightrain/paz-search
        /// <summary>Trigonometric Arcus Secant (Arkussekans) of this <c>Complex</c>.</summary>
        public Complex Asec()
        {
            Complex inv = 1 / this;

            return(-Complex.I * (inv + Complex.I * (1 - inv.Square()).Sqrt()).Ln());
        }
コード例 #9
0
ファイル: Trigonometry.cs プロジェクト: jxz12/EcoBuilder
 /// <summary>
 /// Hyperbolic Area Sine of this <c>Complex</c> number.
 /// </summary>
 /// <param name="value">The complex value.</param>
 /// <returns>The hyperbolic arc sine of a complex number.</returns>
 public static Complex Asinh(this Complex value)
 {
     return((value + (value.Square() + 1).SquareRoot()).Ln());
 }