A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://en.cppreference.com/w/cpp/language/../language/../numeric/complex/conj.html below:

std::conj(std::complex) - cppreference.com

A,B) Additional overloads are provided for all integer and floating-point types, which are treated as complex numbers with zero imaginary component.

(since C++11) [edit] Parameters z - complex value f - floating-point value i - integer value [edit] Return value

1) The complex conjugate of z.

[edit] Notes

The additional overloads are not required to be provided exactly as (A,B). They only need to be sufficient to ensure that for their argument num:

[edit] Example
#include <complex>
#include <iostream>
 
int main()
{
    std::complex<double> z(1.0, 2.0);
    std::cout << "The conjugate of " << z << " is " << std::conj(z) << '\n'
              << "Their product is " << z * std::conj(z) << '\n';
}

Output:

The conjugate of (1,2) is (1,-2)
Their product is (5,0)
[edit] See also

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4