21 #ifndef bempp_complex_aux_hpp
22 #define bempp_complex_aux_hpp
26 #include "scalar_traits.hpp"
32 inline typename ScalarTraits<T>::RealType realPart(
const T& x)
38 inline float realPart(
const std::complex<float>& x)
44 inline double realPart(
const std::complex<double>& x)
50 inline typename ScalarTraits<T>::RealType imagPart(
const T& x)
56 inline float imagPart(
const std::complex<float>& x)
62 inline double imagPart(
const std::complex<double>& x)
68 inline T conj(
const T& x)
74 inline std::complex<float> conj(
const std::complex<float>& x)
80 inline std::complex<double> conj(
const std::complex<double>& x)
88 template <
typename ValueType>
89 inline ValueType expm(
const ValueType& x)
97 template <
typename ValueType>
98 inline std::complex<ValueType> expm(
const std::complex<ValueType>& x)
100 ValueType emx = std::exp(-x.real());
101 return std::complex<ValueType>(cos(x.imag()) * emx, -sin(x.imag() * emx));
108 using Fiber::realPart;
109 using Fiber::imagPart;