From e5f9f4768f9118dcafa5d254cfce7696e36f3a16 Mon Sep 17 00:00:00 2001 From: Christoph Hertzberg Date: Thu, 7 Jun 2018 15:03:50 +0200 Subject: Avoid unnecessary C++11 dependency --- Eigen/src/Core/MathFunctions.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'Eigen/src/Core/MathFunctions.h') diff --git a/Eigen/src/Core/MathFunctions.h b/Eigen/src/Core/MathFunctions.h index 05462c5e1..954863c39 100644 --- a/Eigen/src/Core/MathFunctions.h +++ b/Eigen/src/Core/MathFunctions.h @@ -1282,17 +1282,17 @@ double exp(const double &x) { return ::exp(x); } template<> EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE std::complex exp(const std::complex& x) { - auto com = ::expf(x.real()); - auto res_real = com * ::cosf(x.imag()); - auto res_imag = com * ::sinf(x.imag()); + float com = ::expf(x.real()); + float res_real = com * ::cosf(x.imag()); + float res_imag = com * ::sinf(x.imag()); return std::complex(res_real, res_imag); } template<> EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE std::complex exp(const std::complex& x) { - auto com = ::exp(x.real()); - auto res_real = com * ::cos(x.imag()); - auto res_imag = com * ::sin(x.imag()); + double com = ::exp(x.real()); + double res_real = com * ::cos(x.imag()); + double res_imag = com * ::sin(x.imag()); return std::complex(res_real, res_imag); } #endif -- cgit v1.2.3