// // Cforall Version 1.0.0 Copyright (C) 2016 University of Waterloo // // The contents of this file are covered under the licence agreement in the // file "LICENCE" distributed with Cforall. // // random.c -- // // Author : Peter A. Buhr // Created On : Tue Jul 5 21:29:30 2016 // Last Modified By : Peter A. Buhr // Last Modified On : Wed Jul 6 18:00:29 2016 // Update Count : 3 // #include #include // random #include // getpid int main() { //rand48seed( getpid() ); // set random seed rand48seed( 1003 ); // fixed seed for repeatable tests // test polymorphic calls to random and stream char c = rand48(); sout | c | endl; int i = rand48(); sout | i | endl; unsigned int ui = rand48(); sout | ui | endl; long int li = rand48(); sout | li | endl; unsigned long int uli = rand48(); sout | uli | endl; float f = rand48(); sout | f | endl; double d = rand48(); sout | d | endl; float _Complex fc = rand48(); sout | fc | endl; double _Complex dc = rand48(); sout | dc | endl; long double _Complex ldc = rand48(); sout | ldc | endl; } // main // Local Variables: // // tab-width: 4 // // compile-command: "cfa random.c" // // End: //