random

Discussion in 'Random Thoughts' started by Terrapin Station, Jul 28, 2005.

  1. Terrapin Station

    Terrapin Station Member

    Messages:
    284
    Likes Received:
    1
    here i go (in a mario voice)
     
  2. Terrapin Station

    Terrapin Station Member

    Messages:
    284
    Likes Received:
    1
  3. Terrapin Station

    Terrapin Station Member

    Messages:
    284
    Likes Received:
    1
  4. ihmurria

    ihmurria fini

    Messages:
    17,892
    Likes Received:
    37
  5. jerry420

    jerry420 Doctor of everything Lifetime Supporter

    Messages:
    14,704
    Likes Received:
    28
    #include "Random.h"

    const int Random::A = 48271;
    const int Random::M = 2147483647;
    const int Random::Q = M / A;
    const int Random::R = M % A;


    int Random::randomInt( )
    {
    #ifdef unix
    return random( );
    #else
    int tmpState = A * ( state % Q ) - R * ( state / Q );
    if( tmpState >= 0 )
    state = tmpState;
    else
    state = tmpState + M;

    return state;
    #endif
    }

    double Random::randomReal( )
    {
    return randomInt( ) / 2147483647.0;
    }


    int Random::randomInt( int low, int high )
    {
    return randomInt( ) % ( high - low + 1 ) + low;
    }

    #include <math.h>


    int Random::poisson( double expectedValue )
    {
    double limit = -expectedValue;
    double sum = log( randomReal( ) );

    int count;
    for( count = 0; sum > limit; count++ )
    sum += log( randomReal( ) );

    return count;
    }


    double Random::negExp( double expectedValue )
    {
    return - expectedValue * log( randomReal( ) );
    }
     
  6. Terrapin Station

    Terrapin Station Member

    Messages:
    284
    Likes Received:
    1
    if the gnome is under the pancake then why are you the one with the naked mole rat in your nose HUH HUH HUH?
     
  7. Terrapin Station

    Terrapin Station Member

    Messages:
    284
    Likes Received:
    1
    if what you say is true then who am i to say gog is the evil beefcake pantyhose in the meat cleaver tricicle god man fart doorknob
     
  8. Terrapin Station

    Terrapin Station Member

    Messages:
    284
    Likes Received:
    1
    goot knocking on the hub cap of your sandle reading the book of the gong in that funky flap for the deviant soul is the ficlering hip note the gandering sing of the top held floor panel
     
  9. Terrapin Station

    Terrapin Station Member

    Messages:
    284
    Likes Received:
    1
    or is it that which is not the mouse of bread when it is dead in the 6 of the cold the cod fish will go bad i belive because the group has the feet of the read nosed beaver and the gatoring yak and the gondering moose if the pizza not fresh they give you your money back.
     
  10. Terrapin Station

    Terrapin Station Member

    Messages:
    284
    Likes Received:
    1
    with the buttfaced funny man and the banging on a trash can te glitering rice patty neat made sweet tooth the tedious rack major moldy barf bagger in the fudge held spong in the pants of the soul
     
  11. Death

    Death Grim Reaper Lifetime Supporter

    Messages:
    16,214
    Likes Received:
    295
    shut the hell up and go huff some more gold paint.
     
  12. Terrapin Station

    Terrapin Station Member

    Messages:
    284
    Likes Received:
    1
    yet the beating of the yeild sign not be in the feild pole hey its the fonz now i scored a feild gole how can you explain that which is unexplainable, with a meat forked sandwich and a piggy pattered fish nose.
     
  13. Terrapin Station

    Terrapin Station Member

    Messages:
    284
    Likes Received:
    1
    sorry people i am writing lyrics for a song think beck man. you don't have to read it if you want.
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice