Commit 330189aa authored by Lynn Garren's avatar Lynn Garren

make VC9++ happy

parent 6c3a7be9
......@@ -2,6 +2,7 @@
2013-11-04 Lynn Garren <garren@fnal.gov>
* Random/test: make sure all output streams have unique names
* Random/RandGaussZiggurat - abs type correctness
2013-10-31 Lynn Garren <garren@fnal.gov>
......
......@@ -2,6 +2,7 @@
2013-11-04 Lynn Garren <garren@fnal.gov>
* Random/test: make sure all output streams have unique names
* Random/RandGaussZiggurat - abs type correctness
2013-10-31 Lynn Garren <garren@fnal.gov>
......
......@@ -24,7 +24,7 @@ for generating random variables", Journ. Statistical Software.
#ifndef RandGaussZiggurat_h
#define RandGaussZiggurat_h 1
#include "math.h"
#include "cmath"
#include "CLHEP/Random/defs.h"
#include "CLHEP/Random/RandGauss.h"
......@@ -115,7 +115,7 @@ protected:
static inline float ziggurat_RNOR(HepRandomEngine* anEngine) {
long hz=(signed)ziggurat_SHR3(anEngine);
unsigned long iz=hz&127;
return (fabs(hz)<kn[iz]) ? hz*wn[iz] : ziggurat_nfix(hz,anEngine);
return ((unsigned long)abs(hz)<kn[iz]) ? hz*wn[iz] : ziggurat_nfix(hz,anEngine);
};
static float ziggurat_nfix(long hz,HepRandomEngine* anEngine);
......
......@@ -95,7 +95,7 @@ float RandGaussZiggurat::ziggurat_nfix(long hz,HepRandomEngine* anEngine)
/* initiate, try to exit for(;;) for loop*/
hz=(signed)ziggurat_SHR3(anEngine);
iz=hz&127;
if(fabs(hz)<kn[iz]) return (hz*wn[iz]);
if((unsigned long)abs(hz)<kn[iz]) return (hz*wn[iz]);
}
}
......
Markdown is supported
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