This bugzilla service is closed. All entries have been migrated to https://gitlab.com/libeigen/eigen
Bug 1282 - Type conversion warning
Summary: Type conversion warning
Status: RESOLVED FIXED
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
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-08-28 06:48 UTC by ian.h.bell@gmail.com
Modified: 2019-12-04 16:09 UTC (History)
3 users (show)



Attachments

Description ian.h.bell@gmail.com 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 ian.h.bell@gmail.com 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
EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE
float tanh(float x) { return internal::generic_fast_tanh_float(x); }
#endif
Comment 2 Gael Guennebaud 2016-08-28 20:49:56 UTC
Thank you for the report, fixed: https://bitbucket.org/eigen/eigen/commits/2feb669163
Comment 3 Nobody 2019-12-04 16:09:11 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to gitlab.com'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: https://gitlab.com/libeigen/eigen/issues/1282.

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