The java.lang.StrictMath.tan() is an in-built function in Java which returns the trigonometric tangent of an angle.
public static double tan(double ang)
Parameters: This function accepts a single parameter ang which is a double variable representing an angle (in radians) whose trigonometric tangent is to be returned by the function.
Return Value: This method returns the tangent of the angle passed as argument to the function. It gives rise to special cases:
- The method returns NaN if the argument is NaN or an infinity.
- The result is zero with the same sign as the argument, if the argument is zero.
Input : ang = 0.5235987755982988(30 degree) Output : 0.5773502691896257 Input : ang = 0.7853981633974483(45 degree) Output : 0.9999999999999999
Below programs illustrate the java.lang.StrictMath.tan() function in Java:
tangent value of 60 degrees : 1.7320508075688767
tangent value of 77.128 degrees : 4.376055350774854
- StrictMath pow() Method in Java
- StrictMath log() Method In Java
- StrictMath exp() Method in Java
- StrictMath sin() Method in Java
- StrictMath sinh() Method in Java
- StrictMath tanh() Method in Java
- StrictMath ulp() Method In Java with Examples
- StrictMath fma() method in Java with Examples
- StrictMath toDegrees() Method in Java
- StrictMath toRadians() Method in Java
- StrictMath log10() Method in Java
- StrictMath nextUp() Method in Java
- StrictMath signum() Method in Java
- StrictMath sqrt() Method in Java
- StrictMath getExponent() Method In Java
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.