Sophie

Sophie

distrib > Fedora > 14 > x86_64 > by-pkgid > e26a5663215886b5cab64b98dff7e4d8 > files > 24

nickle-2.69-2.fc13.x86_64.rpm

/*
 * Check the PRNG for a balanced low bit
 *
 * Copyright © 2001  Bart Massey.
 * All Rights Reserved.  See the file COPYING in this directory
 * for licensing information.
 *
 * Bart 2001/3
 */

autoimport PRNG;

int[*] t(int n) {
  int[2] s = {0, 0};
  int i;
  for (i = 0; i < n; i++)
    s[randint(2)]++;
  return s;
}

File::printf ("%d %d\n", t (string_to_integer (argv[1]))...);