Java Data Type Tutorial - Java StrictMath.asin(double a)








Syntax

StrictMath.asin(double a) has the following syntax.

public static double asin(double a)

Example

In the following code shows how to use StrictMath.asin(double a) method.

public class Main {
/*w  w  w. ja  v  a  2  s  .c o  m*/
  public static void main(String[] args) {
  
    double d1 = 0.90 , d2 = 5.00, d3 = 0;

    System.out.println("arc sine value of " + d1 + " = " + StrictMath.asin(d1));
        
    // returns NaN if argument is NaN or its absolute value is greater than 1
    System.out.println("arc sine value of " + d2 + " = " + StrictMath.asin(d2));
        
    // returns zero if the argument is 0
    System.out.println("arc sine value of " + d3 + " = " + StrictMath.asin(d3));    
  }
}

The code above generates the following result.