13.07.2015 Views

IBM Flex System x240 w

IBM Flex System x240 w

IBM Flex System x240 w

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

"ABLE","PRI","PRES","ESE","ANTI","CALLY","ATION","EING"};/***************************************************************************** rand_integer** create a uniform random numeric value of type integer, of random* value between lo and hi. Number is NOT placed in BUFFER, and IS* simply RETURNED.** Routine RETURNS the VALUE.** parameters* ----------* lo end of acceptable value range* hi end of acceptable value range** output* ------* random integer value RETURNED*****************************************************************************/int rand_integer ( int val_lo, int val_hi ){return((random()%(val_hi-val_lo+1))+val_lo);}/***************************************************************************** rand_decimal** create a uniform random numeric value of type double, of random* value between lo and hi with val_dec fractional digits.* Number is NOT placed in BUFFER, and IS simply RETURNED.** Routine RETURNS the VALUE.** parameters* ----------* lo end of acceptable value range* hi end of acceptable value range* number of fractional digits** output* ------* random double value RETURNED*****************************************************************************/double rand_decimal ( int val_lo, int val_hi, int val_dec ){return(rand_integer(val_lo,val_hi)/pow(10.0,(double)val_dec));}/***************************************************************************** seed_1_3000******************************************************************************/void seed_1_3000( void ){int i;for (i = 0; i < CUSTOMERS_PER_DISTRICT; i++) {tbl_cust[i] = 0;}}/***************************************************************************** random_1_3000

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!