(rand % rand) ? shit() : get_off_the_pot();

¥peace from CaMelRyder¥

Replies are listed 'Best First'.
Re: Can't make up my mind
by ikegami (Patriarch) on Aug 01, 2006 at 19:08 UTC
    Did you realize your code was equal to
    rand(%{'rand'}) ? shit() : get_off_the_pot();
    I noticed the above when I realized that the following would give divide by zero errors.
    (rand() % rand()) ? shit() : get_off_the_pot();
Re: Can't make up my mind
by innominate (Beadle) on Aug 23, 2006 at 15:04 UTC
    The likelyhood that (rand % rand) will return false is one out of 4^randbits... Did you possibly mean (int(rand(2)) or (rand>.5)? (UPD: Typo!)