diff --git a/Eigen/src/Core/MathFunctions.h b/Eigen/src/Core/MathFunctions.h index c24665a4b..1311ca38f 100644 --- a/Eigen/src/Core/MathFunctions.h +++ b/Eigen/src/Core/MathFunctions.h @@ -854,7 +854,7 @@ template<> struct ei_random_impl { static inline bool run() { - return bool(ei_random(0,1)); + return ei_random(0,1)==0 ? false : true; }; };