![]() |
VOOZH | about |
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).
Syntax:
template<class T> complex<T>
conj (const complex<T>& Z);
Parameter:
Return value: This function returns the conjugate of the complex number z.
Time Complexity: O(1)
Auxiliary Space: O(1)
Below programs illustrate the conj() function for complex number in C++:
Example 1:-
The conjugate of (3,2.4) is: (3,-2.4)
Example 2:-
The conjugate of (2,9) is: (2,-9)