This bugzilla service is closed. All entries have been migrated to
Bug 1282 - Type conversion warning
Summary: Type conversion warning
Alias: None
Product: Eigen
Classification: Unclassified
Component: Core - general (show other bugs)
Version: 3.3 (current stable)
Hardware: All Windows
: Normal Compilation Problem
Assignee: Nobody
Depends on:
Reported: 2016-08-28 06:48 UTC by
Modified: 2019-12-04 16:09 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:
Comment 3 Nobody 2019-12-04 16:09:11 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance:

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