From: Mikko Vainio (mikko.vainio_at_[hidden])
Date: 2007-07-19 01:08:17
Matthias Troyer wrote:
> On 17 Jul 2007, at 14:58, Mikko Vainio wrote:
>> Dear boosters,
>> Has anyone else noticed that lagged_fibonacci607 produces negative
>> random numbers when compiled with the Intel C++ compiler for Linux
>> using Pentium4 processor specific optimizations? As far as I
>> the random numbers generated by lagged_fibonacci607 should be
>> within the
>> interval [0,1). GCC and the Intel compiler with less aggressive
>> optimizations generate values within that range.
>> This is probably a bug in the Intel compiler, but if anyone has a
>> workaround please let me know.
> Can you see it just with the default seed?
> Which compiler options do you use?
Yes. Based on little experimenting I'd say it occurs with any seed.
The error occurs when any SSE optimizations are turned on: icpc -O2
Below is a short program used for the testing on a 2GHz Core Duo T2500
running Fedora 7.
using namespace std;
int main( int argc, char* argv )
fibo.seed( 34597245 );
unsigned int nErrors = 0;
for( size_t j = 0; j < 10000; ++j )
rndom = fibo();
if( 1. < rndom || 0. > rndom )
cout << "errors = " << nErrors << endl;
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk