Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/examples/random.c

    r6ba0659 r0438091  
    77
    88int main() {
    9         randseed( getpid() );                                                           // set random seed
     9        rand48seed( getpid() );                                                         // set random seed
    1010
    1111        // test polymorphic calls to random and stream
    12         char c = random();
     12        char c = rand48();
    1313        sout | c | endl;
    14         int i = random();
     14        int i = rand48();
    1515    sout | i | endl;
    16         unsigned int ui = random();
     16        unsigned int ui = rand48();
    1717    sout | ui | endl;
    18         long int li = random();
     18        long int li = rand48();
    1919    sout | li | endl;
    20         unsigned long int uli = random();
     20        unsigned long int uli = rand48();
    2121    sout | uli | endl;
    22     float f = random();
     22    float f = rand48();
    2323    sout | f | endl;
    24     double d = random();
     24    double d = rand48();
    2525    sout | d | endl;
    26     float _Complex fc = random();
     26    float _Complex fc = rand48();
    2727    sout | fc | endl;
    28     double _Complex dc = random();
     28    double _Complex dc = rand48();
    2929    sout | dc | endl;
    30     long double _Complex ldc = random();
     30    long double _Complex ldc = rand48();
    3131    sout | ldc | endl;
    3232} // main
Note: See TracChangeset for help on using the changeset viewer.