New user self-registration is currently disabled. Please email eigen-core-team @ if you need an account.
Bug 1282 - Type conversion warning
Type conversion warning
Product: Eigen
Classification: Unclassified
Component: Core - general
3.3 (current stable)
All Windows
: Normal Compilation Problem
Assigned To: Nobody
Depends on:
  Show dependency treegraph
Reported: 2016-08-28 06:48 UTC by
Modified: 2016-08-28 20:49 UTC (History)
3 users (show)


Description 2016-08-28 06:48:27 UTC
In tippy Eigen, in Visual Studio 2015 I get lots of warnings like these

2>c:\users\belli\documents\code\coolprop-v5-new\externals\eigen\eigen\src/Core/MathFunctionsImpl.h(36): warning C4305: 'argument': truncation from 'double' to 'const float'

The offending lines seem to be of the type:

const T alpha_1 = pset1<T>(4.89352455891786e-03);
Comment 1 2016-08-28 06:57:53 UTC
Which in turn arrives from this warning:

2>  c:\users\belli\documents\code\coolprop-v5-new\externals\eigen\eigen\src/Core/MathFunctions.h(1196): note: see reference to function template instantiation 'T Eigen::internal::generic_fast_tanh_float<float>(const T &)' being compiled
2>          with
2>          [
2>              T=float
2>          ]

caused by this function in MathFunctions.h

#if (!defined(__CUDACC__)) && EIGEN_FAST_MATH
float tanh(float x) { return internal::generic_fast_tanh_float(x); }
Comment 2 Gael Guennebaud 2016-08-28 20:49:56 UTC
Thank you for the report, fixed:

Note You need to log in before you can comment on or make changes to this bug.