Changeset 136ccd7 for src/tests/random.c
- Timestamp:
- Nov 3, 2017, 3:01:31 PM (6 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, cleanup-dtors, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- 4ee36bf0
- Parents:
- 4ee1efb (diff), 760ba67 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/tests/random.c
r4ee1efb r136ccd7 10 10 // Created On : Tue Jul 5 21:29:30 2016 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Wed Jul 6 18:00:29 201613 // Update Count : 312 // Last Modified On : Mon Oct 30 23:06:49 2017 13 // Update Count : 6 14 14 // 15 15 … … 19 19 20 20 int main() { 21 // rand48seed( getpid() ); // set random seed22 rand 48seed( 1003 );// fixed seed for repeatable tests21 //srandom( getpid() ); // set random seed 22 random_seed( 1003 ); // fixed seed for repeatable tests 23 23 24 24 // test polymorphic calls to random and stream 25 char c = rand 48();25 char c = random(); 26 26 sout | c | endl; 27 int i = rand 48();27 int i = random(); 28 28 sout | i | endl; 29 unsigned int ui = rand 48();29 unsigned int ui = random(); 30 30 sout | ui | endl; 31 long int li = rand 48();31 long int li = random(); 32 32 sout | li | endl; 33 unsigned long int uli = rand 48();33 unsigned long int uli = random(); 34 34 sout | uli | endl; 35 float f = rand 48();35 float f = random(); 36 36 sout | f | endl; 37 double d = rand 48();37 double d = random(); 38 38 sout | d | endl; 39 float _Complex fc = rand 48();39 float _Complex fc = random(); 40 40 sout | fc | endl; 41 double _Complex dc = rand 48();41 double _Complex dc = random(); 42 42 sout | dc | endl; 43 long double _Complex ldc = rand 48();43 long double _Complex ldc = random(); 44 44 sout | ldc | endl; 45 45 } // main
Note: See TracChangeset
for help on using the changeset viewer.