3#ifndef pRC_CORE_COMPLEX_FUNCTIONS_DIV_H
4#define pRC_CORE_COMPLEX_FUNCTIONS_DIV_H
11 template<IsComplex TA, IsComplex TB>
12 static inline constexpr auto operator/(TA
const &a, TB
const &b)
17 (a.real() * b.real() + a.imag() * b.imag()) * denominator;
19 (a.imag() * b.real() - a.real() * b.imag()) * denominator;
24 template<IsComplex TA, IsValue TB>
25 static inline constexpr auto operator/(TA
const &a, TB
const &b)
27 auto const real = a.real() / b;
28 auto const imag = a.imag() / b;
33 template<IsValue TA, IsComplex TB>
34 static inline constexpr auto operator/(TA
const &a, TB
const &b)
38 auto const real = a * b.real() * denominator;
39 auto const imag = -a * b.imag() * denominator;
Definition cholesky.hpp:10
static constexpr auto rcp(T const &b)
Definition rcp.hpp:12
Complex(T const &) -> Complex< T >
static constexpr decltype(auto) real(X &&a)
Definition real.hpp:12
static constexpr decltype(auto) imag(X &&a)
Definition imag.hpp:12
static constexpr auto operator/(Sequence< T, As... > const, Sequence< T, Bs... > const)
Definition sequence.hpp:179
static constexpr auto norm(T const &a)
Definition norm.hpp:12