
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
ACOS Function for Complex Number in C++
Here we will see the acos() method for the complex numbers. The complex numbers can be used using complex header file. In that header file the acos() function is also present. This is complex version of normal acos() function. This is used to find complex arc cosine of a complex number.
This function takes a complex number as input parameter, and returns the arc cosine as output. Let us see one example to get the idea.
Example
#include<iostream> #include<complex> using namespace std; main() { complex<double> c1(5, 2); //acos() function for complex number cout << "The acos() of " << c1<< " is "<< acos(c1); }
Output
The acos() of (5,2) is (0.386565,-2.37055)
Advertisements