pRC
multi-purpose Tensor Train library for C++
Loading...
Searching...
No Matches
acos.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: BSD-2-Clause
2
3#ifndef pRC_CORE_COMPLEX_FUNCTIONS_ACOS_H
4#define pRC_CORE_COMPLEX_FUNCTIONS_ACOS_H
5
9
10namespace pRC
11{
12 template<class T>
13 static inline constexpr auto acos(Complex<T> const &a)
14 {
15 auto const t = asin(a);
16 auto const real = pi<T>() / identity<T>(2) - t.real();
17 auto const imag = t.imag();
18
19 return Complex(real, imag);
20 }
21}
22#endif // pRC_CORE_COMPLEX_FUNCTIONS_ACOS_H
Definition complex.hpp:26
Definition cholesky.hpp:18
static constexpr decltype(auto) imag(X &&a)
Definition imag.hpp:11
static constexpr decltype(auto) real(X &&a)
Definition real.hpp:11
static constexpr auto acos(Complex< T > const &a)
Definition acos.hpp:13
static constexpr Conditional< IsSatisfied< C >, RemoveConstReference< X >, X > copy(X &&a)
Definition copy.hpp:13
static constexpr auto asin(Complex< T > const &a)
Definition asin.hpp:13