示例#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));
 }