StrictMath.asin() in Java

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

Syntax:

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

This method takes one argument of type of double as its parameter. This method returns the arc sine of a value; the returned angle is in the range -pi/2 through pi/2.

Special cases:

1. If the argument is NaN or its absolute value is greater than 1, 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: the value whose arc sine is to be returned.

Returns: the arc sine of the argument.

Exceptions: NA

Approach

Java

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

        double a = 0.45;
        System.out.println(StrictMath.asin(a));
    }
}

Output:

0.4667653390472964


No comments:

Post a Comment