public static double Log10(double x) { if (x <= 0.0) throw new ArithmeticException("range exception"); return Math.Log(x)/2.30258509299404568401; }