using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace testing { internal class FunctionsMath { public double pow(double a, double pow) { for (int i = 1; i < pow; i++) { a *= a; } return a; } public struct Trigonometry { public static double tg(double a) => Math.Sin(a) / cos(a); public static double cos(double a) { if (Math.Sin(a) > 0) return Math.Sqrt(1 - (Math.Sin(a) * Math.Sin(a))); else return -Math.Sqrt(1 - (Math.Sin(a) * Math.Sin(a))); } public static double sec(double a) => 1 / cos(a); public static double cot(double a) => cos(a) / Math.Sin(a); } public struct Logarifms { public static double log(double a, double b) { double res = 0; if (a > 0 && a != 1 && b > 0) { res = Math.Log(b) / Math.Log(a); } return res; } } } }