StrictMath.log10(): This method is available in java.lang.StrictMath class of Java.
Syntax:
double java.lang.StrictMath.log10(double a)
This method takes one argument of type double as its parameter. This method returns the base 10 logarithms of a double value.
Special cases:
1. If the argument is NaN or less than zero, then the result is NaN.
2. If the argument is positive infinity, then the result is positive infinity.
3. If the argument is positive zero or negative zero, then the result is negative infinity.
4. If the argument is equal to 10^n for integer n, then the result is n.
Parameters: One parameter is required for this method.
a: a value.
Returns: the base 10 logarithm of a.
Exceptions: NA
Approach
Java
public class StrictMathlog10 {public static void main(String[] args) {double a = 1708.89;System.out.println(StrictMath.log10(a));}}
Output:
3.2327141084021216
No comments:
Post a Comment