30 Aug
2005
30 Aug
'05
2:45 a.m.
The Boost 1.33.0 random library equality operators seem to be implemented incorrectly. For example, in file random/lagged_fibonacci.hpp starting at line 390 we have the following: friend bool operator==(const lagged_fibonacci_01& x, const lagged_fibonacci_01& y) { return x.i == y.i && std::equal(x.x, x.x+long_lag, y.x); } The std::equal() call is comparing an array of doubles using operator == which I thought was impossible for floating point types due to their inexact nature et al. This is causing all the test cases using floating point types to fail on AmigaOS with GCC 3.4.4. Is this an implementation error or am I missing something? --Steven