int function ( ) { double loc0 , loc1 , loc2 ; do { loc1 = uniform ( - 1.0 , 1.0 ) ; loc2 = uniform ( - 1.0 , 1.0 ) ; loc0 = loc1 * loc1 + loc2 * loc2 ; } while ( loc0 >= 1 || loc0 == 0 ) ; return ( int ) Math . round ( loc1 * Math . sqrt ( - 2 * Math . log ( loc0 ) / loc0 ) ) ; }
return a real number with a standard gaussian distribution . concode_field_sep int CONSTANT concode_elem_sep String filename concode_elem_sep int nodes concode_elem_sep int failingNodes concode_elem_sep int EXPONENTIAL concode_elem_sep int mttf concode_elem_sep int nBlocks concode_elem_sep List<Integer> failedNodes concode_elem_sep int time concode_elem_sep int GAUSSIAN concode_elem_sep int distrType concode_field_sep String nextFailingNode concode_elem_sep int exponential concode_elem_sep double uniform concode_elem_sep int constant concode_elem_sep void parseArgs concode_elem_sep int nextFailure concode_elem_sep int poisson concode_elem_sep void main