commit | 8e9cc5b10a16dde87c65e9e9c4471095f78e11d4 | [log] [tgz] |
---|---|---|
author | Antonio Sanchez <cantonios@google.com> | Mon Nov 16 10:39:09 2020 -0800 |
committer | Antonio Sanchez <cantonios@google.com> | Mon Nov 16 10:39:09 2020 -0800 |
tree | df2c2dc47ceb10396c1428e21068c88e903530e0 | |
parent | 9175f50d6f88bd38789f2a9c6d4f0bfe1b8b6b37 [diff] |
Eliminate double-promotion warnings. Clang currently complains about implicit conversions, e.g. ``` test/packetmath.cpp:680:59: warning: implicit conversion increases floating-point precision: 'typename Eigen::internal::random_retval<typename Eigen::internal::global_math_functions_filtering_base<double>::type>::type' (aka 'double') to 'long double' [-Wdouble-promotion] data1[0] = Scalar((2 * k + k1) * EIGEN_PI / 2 * internal::random<double>(0.8, 1.2)); ~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ test/packetmath.cpp:681:40: warning: implicit conversion increases floating-point precision: 'float' to 'long double' [-Wdouble-promotion] data1[1] = Scalar((2 * k + 2 + k1) * EIGEN_PI / 2 * internal::random<double>(0.8, 1.2)); ``` Modified to explicitly cast to double.
Eigen is a C++ template library for linear algebra: matrices, vectors, numerical solvers, and related algorithms.
For more information go to http://eigen.tuxfamily.org/.
For pull request, bug reports, and feature requests, go to https://gitlab.com/libeigen/eigen.