Java StrictMath.log1p(double x)
Syntax
StrictMath.log1p(double x) has the following syntax.
public static double log1p(double x)
Example
In the following code shows how to use StrictMath.log1p(double x) method.
public class Main {
//from w ww. j ava 2 s . c o m
public static void main(String[] args) {
double d1 = 90 , d2 = 0.0 , d3 = (1.0/0.0);
System.out.println("Logarithm value of double (d1 + 1) with base 10 :" +
StrictMath.log1p(d1));
System.out.println("Logarithm value of double (d2 + 1) with base 10 :" +
StrictMath.log1p(d2));
System.out.println("Logarithm value of double (d3 + 1) with base 10 :" +
StrictMath.log1p(d3));
}
}
The code above generates the following result.