Created attachment 878 [details]
patch with fix
This fixes failures in test rand on MIPS32R5.
The failures are a result of undefined behavior in template<typename Scalar> struct random_default_impl<Scalar, false, true>.
With certain values of arguments x and y there's a signed integer overflow in expression ScalarX(y)-ScalarX(x). This showed with the particular compiler version we're using for MIPS32R5.
Also, the template wouldn't handle the whole range of Scalar when it's 64-bit (long long or __int64) on 32-bit CPUs. This should fix it as well.
Thank you for the patch, looks good to me so I applied it in 3.3 and default branches:
Was removal of is_integral<> intended in 3.3? Just checking.
I've been too fast, my bad
-- 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/1584.