diff --git a/MathTrigonometric/MathTrig.cs b/MathTrigonometric/MathTrig.cs index e1cb036..c73cce3 100644 --- a/MathTrigonometric/MathTrig.cs +++ b/MathTrigonometric/MathTrig.cs @@ -358,9 +358,9 @@ public static double Asinh(double x) //the Trigonometric Symmetry is applied: arsinh(−x)=−arsinh(x) if (IsNegative(x)) - return -Math.Log(-x + Math.Sqrt(Math.Pow(x, 2.0) + 1.0)); + return -Math.Log(-x + Math.Sqrt(x * x + 1.0)); - return Math.Log(x + Math.Sqrt(Math.Pow(x, 2.0) + 1.0)); + return Math.Log(x + Math.Sqrt(x * x + 1.0)); } /// @@ -381,7 +381,7 @@ public static double Acosh(double x) if (x < 1.0) return double.NaN; - return Math.Log(x + Math.Sqrt(Math.Pow(x, 2.0) - 1.0)); + return Math.Log(x + Math.Sqrt(x * x - 1.0)); } /// @@ -430,9 +430,9 @@ public static double Acsch(double x) //the Trigonometric Symmetry is applied: arcsch(−x)=−arcsch(x) if (IsNegative(x)) - return -Math.Log(1.0 / -x + Math.Sqrt(1.0 / Math.Pow(x, 2.0) + 1.0)); + return -Math.Log(1.0 / -x + Math.Sqrt(1.0 / (x * x) + 1.0)); - return Math.Log(1.0 / x + Math.Sqrt(1.0 / Math.Pow(x, 2.0) + 1.0)); + return Math.Log(1.0 / x + Math.Sqrt(1.0 / (x * x) + 1.0)); } /// @@ -451,7 +451,7 @@ public static double Asech(double x) if (x is <= 0.0 or > 1.0) return double.NaN; - return Math.Log(1.0 / x + Math.Sqrt(1.0 / Math.Pow(x, 2.0) - 1.0)); + return Math.Log(1.0 / x + Math.Sqrt(1.0 / (x * x) - 1.0)); } /// diff --git a/MathTrigonometric/MathTrigonometric.csproj b/MathTrigonometric/MathTrigonometric.csproj index 7f8e570..e35db64 100644 --- a/MathTrigonometric/MathTrigonometric.csproj +++ b/MathTrigonometric/MathTrigonometric.csproj @@ -17,7 +17,7 @@ math; trigonometric; trigonometry; cot; sec; csc; acot; asec; acsc; coth; sech; csch; acoth; asech; acsch; It targets .NET Standard 2.0 and higner version. LICENSE - 1.0.6 + 1.0.7