The conj() function is defined in the complex header file. This function is used to find the conjugate of the complex number z. If we represent a complex number z as (real, img), then its conjugate is (real, -img).
template<class T> complex<T> conj (const complex<T>& Z);
- z: This method takes a mandaory parameter z which represents the complex number.
Return value: This function returns the conjugate of the complex number z.
Below programs illustrate the conj() function for complex number in C++:
The conjugate of (3,2.4) is: (3,-2.4)
The conjugate of (2,9) is: (2,-9)
- wcscpy() function in C++ with Examples
- wcslen() function in C++ with Examples
- wcsspn() function in C/C++ with Examples
- wcscmp() function in C++ with Examples
- btowc() function in C/C++ with Examples
- quick_exit() function in C++ with Examples
- norm() function in C++ with Examples
- not1 and not2 function templates in C++ STL with Examples
- Function Overloading vs Function Overriding in C++
- What happens when a virtual function is called inside a non-virtual function in C++
- std::mismatch() with examples in C++
- feclearexcept in C++ with Examples
- ratio_equal() in C++ with examples
- mbrtoc32() in C/C++ with Examples
- mbrtoc16() in C/C++ with Examples
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.