예제 #1
0
파일: math.cs 프로젝트: jschementi/iron
 public static double log(BigInteger value, double newBase) {
     if (newBase <= 0.0 || value <= 0) {
         throw PythonOps.ValueError("math domain error");
     } else if (newBase == 1.0) {
         throw PythonOps.ZeroDivisionError("float division");
     } else if (newBase == Double.PositiveInfinity) {
         return 0.0;
     }
     return Check(value.Log(newBase));
 }
예제 #2
0
 public static double Log(BigFloat value, double baseValue)
 => BigInteger.Log(value.Numerator, baseValue) - BigInteger.Log(value.Numerator, baseValue);
예제 #3
0
파일: math.cs 프로젝트: jschementi/iron
 public static double log(BigInteger value) {
     if (value.Sign <= 0) {
         throw PythonOps.ValueError("math domain error");
     }
     return value.Log();
 }
예제 #4
0
 public double Log(double baseValue)
 {
     return(BigInteger.Log(numerator, baseValue) - BigInteger.Log(numerator, baseValue));
 }