2010-06-17 Geoff Norton <gnorton@novell.com>
[mono.git] / mono / tests / random.cs
blob004046c97658f1430c8eb7c558f12c98b1d6214e
2 public class GenRandom {
3 static int last = 42;
5 public static double gen_random(double max) {
7 last = (last * 3877 + 29573) % 139968;
8 return( max * last / 139968 );
11 public static int Main() {
12 int N = 900000;
13 double result = 0;
15 while (N-- != 0) {
16 result = gen_random(100.0);
18 //printf("%.9f\n", result);
19 return(0);