log10 static method
Computes the base-10 logarithm of a double value.
- If the argument is NaN or less than zero, then the result is NaN.
- If the argument is positive infinity, then the result is positive infinity.
- If the argument is positive zero or negative zero, then the result is negative infinity.
@param x a positive number @return the value log a, the base-10 logarithm of the input value
Implementation
static double log10(double x) {
double ln = math.log(x);
if (ln.isInfinite) return ln;
if (ln.isNaN) return ln;
return ln / LOG_10;
}