##### cppreference.com

##### Search

Create account

##### Namespaces

- Page
- Discussion

##### Variants

##### Views

- View
- Edit
- History

##### Actions

# std::abs(std::complex)

From cppreference.com
< cpp‎ | numeric‎ | complex

Defined in header `<complex>` |  |
template< class T > T abs( const complex<T>& z ); |  |

Returns the magnitude of the complex number `z`.

### [edit] Parameters

z | - | complex value

### [edit] Return value

the magnitude of `z`

### [edit] See also

arg | returns the phase angle (function template) [edit]

Retrieved from "http://en.cppreference.com/mwiki/index.php?title=cpp/numeric/complex/abs&oldid=58451"