| At 11:43 AM -0400 7/15/98, Ruston, Paul wrote:
>Could anyone recommend a simple way to generate random +1's and -1's
>(whole #'s - nothing in between and no zeros)? Maybe there's a simple
>formula I could use with krnd without using if - then statements?
k1 rand
k2 = 2*int(2*k1)-1
-------------------------------------------------------------------------------
Erik Spjut (rhymes with cute) - Acting Director,The Center for Design Education
and/or Associate Professor of Engineering
Harvey Mudd College, Claremont, CA 91711 USA
Erik_Spjut@hmc.edu Ph & Voice mail (909) 607-3890 Fax (909) 621-8967
|