diff -rupN --no-dereference eigen-3.3.9/Eigen/src/Core/MathFunctions.h eigen-3.3.9-new/Eigen/src/Core/MathFunctions.h --- eigen-3.3.9/Eigen/src/Core/MathFunctions.h 2020-12-04 22:53:41.000000000 +0100 +++ eigen-3.3.9-new/Eigen/src/Core/MathFunctions.h 2021-01-19 12:32:05.328624222 +0100 @@ -485,12 +485,22 @@ struct log1p_impl { EIGEN_STATIC_ASSERT_NON_INTEGER(Scalar) #if EIGEN_HAS_CXX11_MATH using std::log1p; - #endif + #else using std_fallback::log1p; + #endif return log1p(x); } }; +// Specialization for complex types that are not supported by std::log1p. +template +struct log1p_impl > { + EIGEN_DEVICE_FUNC static inline std::complex run( + const std::complex& x) { + EIGEN_STATIC_ASSERT_NON_INTEGER(RealScalar) + return std_fallback::log1p(x); + } +}; template struct log1p_retval