From 4fb3459a2315b94541b122bc9fd16a26a8e861ec Mon Sep 17 00:00:00 2001 From: Christoph Hertzberg Date: Sat, 27 Feb 2021 16:16:10 +0100 Subject: [PATCH] Fix double-promotion warnings (cherry picked from commit c22c103e932e511e96645186831363585a44b7a3) --- Eigen/src/Core/arch/Default/GenericPacketMathFunctions.h | 2 +- unsupported/Eigen/src/FFT/ei_kissfft_impl.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Eigen/src/Core/arch/Default/GenericPacketMathFunctions.h b/Eigen/src/Core/arch/Default/GenericPacketMathFunctions.h index d8603b406..b1d4be32d 100644 --- a/Eigen/src/Core/arch/Default/GenericPacketMathFunctions.h +++ b/Eigen/src/Core/arch/Default/GenericPacketMathFunctions.h @@ -1369,7 +1369,7 @@ struct fast_accurate_exp2 { const Packet p0 = pset1(0.240226506959101332); const Packet C_hi = pset1(0.693147180559945286); const Packet C_lo = pset1(4.81927865669806721e-17); - const Packet one = pset1(1.0f); + const Packet one = pset1(1.0); // Evaluate P(x) in working precision. // We evaluate even and odd parts of the polynomial separately diff --git a/unsupported/Eigen/src/FFT/ei_kissfft_impl.h b/unsupported/Eigen/src/FFT/ei_kissfft_impl.h index 303f85f13..430953aee 100644 --- a/unsupported/Eigen/src/FFT/ei_kissfft_impl.h +++ b/unsupported/Eigen/src/FFT/ei_kissfft_impl.h @@ -31,7 +31,7 @@ struct kiss_cpx_fft using numext::cos; m_inverse = inverse; m_twiddles.resize(nfft); - double phinc = 0.25 * EIGEN_PI / nfft; + double phinc = 0.25 * double(EIGEN_PI) / nfft; Scalar flip = inverse ? Scalar(1) : Scalar(-1); m_twiddles[0] = Complex(Scalar(1), Scalar(0)); if ((nfft&1)==0)