[simd.complex.math]

# 29 Numerics library [[numerics]](./#numerics)

## 29.10 Data-parallel types [[simd]](simd#complex.math)

### 29.10.8 basic_vec non-member operations [[simd.nonmembers]](simd.nonmembers#simd.complex.math)

#### 29.10.8.15 vec complex math [simd.complex.math]

[ð](#lib:real,simd)

`template<[simd-complex](simd.expos#concept:simd-complex "29.10.2 Exposition-only types, variables, and concepts [simd.expos]") V>
  constexpr rebind_t<simd-complex-value-type<V>, V> real(const V&) noexcept;
template<[simd-complex](simd.expos#concept:simd-complex "29.10.2 Exposition-only types, variables, and concepts [simd.expos]") V>
  constexpr rebind_t<simd-complex-value-type<V>, V> imag(const V&) noexcept;

template<[simd-complex](simd.expos#concept:simd-complex "29.10.2 Exposition-only types, variables, and concepts [simd.expos]") V>
  constexpr rebind_t<simd-complex-value-type<V>, V> abs(const V&);
template<[simd-complex](simd.expos#concept:simd-complex "29.10.2 Exposition-only types, variables, and concepts [simd.expos]") V>
  constexpr rebind_t<simd-complex-value-type<V>, V> arg(const V&);
template<[simd-complex](simd.expos#concept:simd-complex "29.10.2 Exposition-only types, variables, and concepts [simd.expos]") V>
  constexpr rebind_t<simd-complex-value-type<V>, V> norm(const V&);
template<[simd-complex](simd.expos#concept:simd-complex "29.10.2 Exposition-only types, variables, and concepts [simd.expos]") V> constexpr V conj(const V&);
template<[simd-complex](simd.expos#concept:simd-complex "29.10.2 Exposition-only types, variables, and concepts [simd.expos]") V> constexpr V proj(const V&);

template<[simd-complex](simd.expos#concept:simd-complex "29.10.2 Exposition-only types, variables, and concepts [simd.expos]") V> constexpr V exp(const V& v);
template<[simd-complex](simd.expos#concept:simd-complex "29.10.2 Exposition-only types, variables, and concepts [simd.expos]") V> constexpr V log(const V& v);
template<[simd-complex](simd.expos#concept:simd-complex "29.10.2 Exposition-only types, variables, and concepts [simd.expos]") V> constexpr V log10(const V& v);

template<[simd-complex](simd.expos#concept:simd-complex "29.10.2 Exposition-only types, variables, and concepts [simd.expos]") V> constexpr V sqrt(const V& v);
template<[simd-complex](simd.expos#concept:simd-complex "29.10.2 Exposition-only types, variables, and concepts [simd.expos]") V> constexpr V sin(const V& v);
template<[simd-complex](simd.expos#concept:simd-complex "29.10.2 Exposition-only types, variables, and concepts [simd.expos]") V> constexpr V asin(const V& v);
template<[simd-complex](simd.expos#concept:simd-complex "29.10.2 Exposition-only types, variables, and concepts [simd.expos]") V> constexpr V cos(const V& v);
template<[simd-complex](simd.expos#concept:simd-complex "29.10.2 Exposition-only types, variables, and concepts [simd.expos]") V> constexpr V acos(const V& v);
template<[simd-complex](simd.expos#concept:simd-complex "29.10.2 Exposition-only types, variables, and concepts [simd.expos]") V> constexpr V tan(const V& v);
template<[simd-complex](simd.expos#concept:simd-complex "29.10.2 Exposition-only types, variables, and concepts [simd.expos]") V> constexpr V atan(const V& v);
template<[simd-complex](simd.expos#concept:simd-complex "29.10.2 Exposition-only types, variables, and concepts [simd.expos]") V> constexpr V sinh(const V& v);
template<[simd-complex](simd.expos#concept:simd-complex "29.10.2 Exposition-only types, variables, and concepts [simd.expos]") V> constexpr V asinh(const V& v);
template<[simd-complex](simd.expos#concept:simd-complex "29.10.2 Exposition-only types, variables, and concepts [simd.expos]") V> constexpr V cosh(const V& v);
template<[simd-complex](simd.expos#concept:simd-complex "29.10.2 Exposition-only types, variables, and concepts [simd.expos]") V> constexpr V acosh(const V& v);
template<[simd-complex](simd.expos#concept:simd-complex "29.10.2 Exposition-only types, variables, and concepts [simd.expos]") V> constexpr V tanh(const V& v);
template<[simd-complex](simd.expos#concept:simd-complex "29.10.2 Exposition-only types, variables, and concepts [simd.expos]") V> constexpr V atanh(const V& v);
`

[1](#1)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/numerics.tex#L19975)

*Returns*: A basic_vec object ret where the ith element is
initialized to the result of *cmplx-func*(v[i]) for alli in the range [0, V​::​size()), where *cmplx-func* is the
corresponding function from [<complex>](complex.syn#header:%3ccomplex%3e "29.4.2 Header <complex> synopsis [complex.syn]")[.](#1.sentence-1)

If in an invocation of*cmplx-func* for index i a domain, pole, or range error would
occur, the value of ret[i] is unspecified[.](#1.sentence-2)

[2](#2)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/numerics.tex#L19984)

*Remarks*: It is unspecified whether errno ([[errno]](errno "19.4 Error numbers")) is accessed[.](#2.sentence-1)

[ð](#lib:polar,simd)

`template<[simd-floating-point](simd.expos#concept:simd-floating-point "29.10.2 Exposition-only types, variables, and concepts [simd.expos]") V>
  rebind_t<complex<typename V::value_type>, V> polar(const V& x, const V& y = {});

template<[simd-complex](simd.expos#concept:simd-complex "29.10.2 Exposition-only types, variables, and concepts [simd.expos]") V> constexpr V pow(const V& x, const V& y);
`

[3](#3)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/numerics.tex#L19999)

*Returns*: A basic_vec object ret where the ith element is
initialized to the result of *cmplx-func*(x[i], y[i]) for all i in the range [0, V​::​size()), where *cmplx-func* is the corresponding function from [<complex>](complex.syn#header:%3ccomplex%3e "29.4.2 Header <complex> synopsis [complex.syn]")[.](#3.sentence-1)

If in an invocation of*cmplx-func* for index i a domain, pole, or range error would
occur, the value of ret[i] is unspecified[.](#3.sentence-2)

[4](#4)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/numerics.tex#L20008)

*Remarks*: It is unspecified whether errno ([[errno]](errno "19.4 Error numbers")) is accessed[.](#4.sentence-1)
