std::complex::operator+=,-=,*=,/=

< cpp‎ | numeric‎ | complex

C++
 Language Standard library headers Concepts Utilities library Strings library Containers library Algorithms library Iterators library Numerics library Input/output library Localizations library Regular expressions library (C++11) Atomic operations library (C++11) Thread support library (C++11) Filesystem library (C++17) Technical Specifications

Numerics library
 Common mathematical functions Special mathematical functions Floating-point environment (C++11) Complex numbers Numeric arrays Pseudo-random number generation Compile-time rational arithmetic (C++11) Numeric algorithms gcd(C++17) lcm(C++17) Generic numeric operations iota(C++11) accumulate inner_product adjacent_difference partial_sum

std::complex
Member functions
complex::operator+=complex::operator-=complex::operator*=complex::operator/=
Non-member functions
 real imag abs arg norm conj proj(C++11) polar operator""ioperator""ifoperator""il(C++14)(C++14)(C++14)
Exponential functions
Power functions
Trigonometric functions
 asin(C++11) acos(C++11) atan(C++11)
Hyperbolic functions
 asinh(C++11) acosh(C++11) atanh(C++11)

 complex& operator+=( const T& other ); (1) template< class X > complex& operator+=( const complex& other ); (2) complex& operator-=( const T& other ); (3) template< class X > complex& operator-=( const complex& other ); (4) complex& operator*=( const T& other ); (5) template< class X > complex& operator*=( const complex& other ); (6) complex& operator/=( const T& other ); (7) template< class X > complex& operator/=( const complex& other ); (8)

Implements the compound assignment operators for complex arithmetic and for mixed complex/scalar arithmetic. Scalar arguments are treated as complex numbers with the real part equal to the argument and the imaginary part set to zero.

3-4) Subtracts other from *this.
5-6) Multiplies *this by other.
7-8) Divides *this by other.

Parameters

 other - a complex or scalar value of matching type (float, double, long double)

*this