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?

--Steven


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net