Hi,
I'm trying out the current Eigen default branch ("almost-3.3"), compiling code that has been using Eigen 3.2 until now.
I'm using the GCC warnings -Wdouble-promotion and -Wfloat-conversion as these are really helpful to uncover performance bugs on some of the ARM CPUs I am using (only single-precision FPU, use of double is very slow).
This uncovered some slight bugs in Core/SpecialFunctions.h where some expressions were using double-precision when they should use floats, such as
extern/eigen3/Eigen/src/Core/SpecialFunctions.h:762:13: error: implicit conversion from 'float' to 'double' to match other operand of binary _expression_ [-Werror=double-promotion]
c *= x/r;
extern/eigen3/Eigen/src/Core/SpecialFunctions.h:767:25: error: conversion to 'float' from 'double' may alter its value [-Werror=float-conversion]
return (ans * ax / a);
Attached here is a small patch that fixes the issues I found. It was created against the default branch as of this morning. I'm not experienced with Mercurial so I hope i made the file correctly - please let me know if it should be done differently.
Best regards,
Ola