2 #include "nlopt-util.h"
8 uint32_t init[4]={0x123, 0x234, 0x345, 0x456}, length=4;
9 nlopt_init_by_array(init, length);
11 nlopt_init_genrand(5489UL);
12 /* nlopt_genrand_int32 */
13 printf("1000 outputs of nlopt_iurand()\n");
14 for (i=0; i<1000; i++) {
15 printf("%10d ", nlopt_iurand(0x7fff));
16 if (i%5==4) printf("\n");
19 printf("\n1000 outputs of nlopt_urand()\n");
20 for (i=0; i<1000; i++) {
21 printf("%10.8f ", nlopt_urand(0,1));
22 if (i%5==4) printf("\n");