StrictMath.tan() in Java

StrictMath.tan(): This method is available in java.lang.StrictMath class of Java.

Syntax:

double java.lang.StrictMath.tan(double a)

This method takes one argument of type double as its parameter. This method returns the trigonometric tangent of an angle.

Note:

1. If the argument is NaN or an infinity, then the result is NaN.

2. If the argument is zero, then the result is a zero with the same sign as the argument.

Parameters: One parameter is required for this method.

a: an angle, in radians.

Returns: the tangent of the argument.

Exceptions: NA

Approach

Java

public class StrictMathtan {
    public static void main(String[] args) {

        double a = 0.167;
        System.out.println(StrictMath.tan(a));
    }
}

Output:

0.16857000433591113


No comments:

Post a Comment