asin() function for complex number in C++?

C++Server Side ProgrammingProgramming

Here we will see the asin() method for the complex numbers. The complex numbers can be used using complex header file. In that header file the asin () function is also present. This is complex version of normal asin () function. This is used to find complex arc sine of a complex number.

This function takes a complex number as input parameter, and returns the arc sine as output. Let us see one example to get the idea.

Example

 Live Demo

#include<iostream>
#include<complex>
using namespace std;
int main() {
   complex<double> c1(5, 2);
   //asin() function for complex number
   cout << "The asin() of " << c1<< " is "<< asin(c1);
}

Output

The asin() of (5,2) is (1.18423,2.37055)
raja
Published on 25-Jul-2019 14:16:39
Advertisements