Boost logo

Boost Users :

From: Steven Solie (ssolie_at_[hidden])
Date: 2005-08-29 21:45:33

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?


Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at