Commit 3738010d authored by Lynn Garren's avatar Lynn Garren
Browse files

deal with an undefined order of execution warning reported by gcc 4.5

parent 67e23c84
2010-06-30 Lynn Garren <garren@fnal.gov>
* src/Hurd160Engine.cc, Hurd288Engine.cc: deal with an undefined
order of execution warning reported by gcc 4.5
2010-06-23 Mark Fischler <mf@fnal.gov> and Lynn Garren <garren@fnal.gov>
* Random/RanecuEngine.h: add a private method (see below)
* src/RanecuEngine.cc: Modify constructor and setSeed to utilize all
info provided and avoid coincidence of same state from different seeds
* test/testRanecuSequence.cc: test for repeating sequences
==============================
16.06.10 Release CLHEP-2.1.0.0.b01
==============================
......
// $Id: Hurd160Engine.cc,v 1.6 2010/06/16 17:24:53 garren Exp $
// $Id: Hurd160Engine.cc,v 1.7 2010/07/20 18:07:17 garren Exp $
// -*- C++ -*-
//
// -----------------------------------------------------------------------
......@@ -134,9 +134,12 @@ double Hurd160Engine::flat() {
advance();
}
return words[--wordIndex] * twoToMinus_32() + // most significant part
(words[--wordIndex]>>11) * twoToMinus_53() + // fill in rest of bits
nearlyTwoToMinus_54(); // make sure non-zero
// LG 6/30/2010
// define the order of execution for --wordIndex
double x = words[--wordIndex] * twoToMinus_32() ; // most significant part
double y = (words[--wordIndex]>>11) * twoToMinus_53() + // fill in rest of bits
nearlyTwoToMinus_54(); // make sure non-zero
return x + y ;
}
void Hurd160Engine::flatArray( const int size, double* vect ) {
......
// $Id: Hurd288Engine.cc,v 1.6 2010/06/16 17:24:53 garren Exp $
// $Id: Hurd288Engine.cc,v 1.7 2010/07/20 18:07:17 garren Exp $
// -*- C++ -*-
//
// -----------------------------------------------------------------------
......@@ -154,9 +154,12 @@ double Hurd288Engine::flat() {
advance();
}
return words[--wordIndex] * twoToMinus_32() + // most significant part
(words[--wordIndex]>>11) * twoToMinus_53() + // fill in rest of bits
// LG 6/30/2010
// define the order of execution for --wordIndex
double x = words[--wordIndex] * twoToMinus_32() ; // most significant part
double y = (words[--wordIndex]>>11) * twoToMinus_53() + // fill in rest of bits
nearlyTwoToMinus_54(); // make sure non-zero
return x + y;
}
void Hurd288Engine::flatArray( const int size, double* vect ) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment