public static double log(BigInteger value) { return Check(value.Log()); }
public static double log(BigInteger value) { if (value.Sign <= 0) { throw PythonOps.ValueError("math domain error"); } return value.Log(); }
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)); }
public static double asinh(BigInteger value) { if (value == 0) { return 0; } // rewrote ln(v0 + sqrt(v0**2 + 1)) for precision if (value.Abs() > 1) { return value.Log() + Math.Log(1.0 + Complex64.Hypot(1.0, 1.0 / value)); } else { return Math.Log(value + Complex64.Hypot(1.0, value)); } }