diff --git a/Eigen/src/Core/arch/Default/GenericPacketMathFunctions.h b/Eigen/src/Core/arch/Default/GenericPacketMathFunctions.h index 9dc26f469..a8837b235 100644 --- a/Eigen/src/Core/arch/Default/GenericPacketMathFunctions.h +++ b/Eigen/src/Core/arch/Default/GenericPacketMathFunctions.h @@ -805,7 +805,7 @@ Packet pasin_float(const Packet& x_in) { p = pmadd(p, x2, p1); p = pmul(p, x); - constexpr float kPiOverTwo = static_cast(0.5*EIGEN_PI); + constexpr float kPiOverTwo = static_cast(EIGEN_PI/2); Packet p_large = pnmadd(cst_two, p, pset1(kPiOverTwo)); p = pselect(large_mask, p_large, p); // Flip the sign for negative arguments. diff --git a/test/array_cwise.cpp b/test/array_cwise.cpp index 64c4c2a86..502d1cc9d 100644 --- a/test/array_cwise.cpp +++ b/test/array_cwise.cpp @@ -152,10 +152,6 @@ void test_exponent(Exponent exponent) { double double_threshold = calc_overflow_threshold(numext::abs(exponent)); // use the lesser of these two thresholds Base testing_threshold = threshold < double_threshold ? threshold : static_cast(double_threshold); - // avoid divide by zero - Base min_abs_base = exponent < 0 ? 1 : 0; - // avoid excessively long test - Base max_abs_base = numext::mini(testing_threshold, max_abs_bases); // test both vectorized and non-vectorized code paths const Index array_size = 2 * internal::packet_traits::size + 1;