projects
/
mono.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
2004-06-05 Atsushi Enomoto <atsushi@ximian.com>
[mono.git]
/
mono
/
tests
/
random.cs
1
2
public class GenRandom {
3
static int last = 42;
4
5
public static double gen_random(double max) {
6
7
last = (last * 3877 + 29573) % 139968;
8
return( max * last / 139968 );
9
}
10
11
public static int Main() {
12
int N = 900000;
13
double result = 0;
14
15
while (N-- != 0) {
16
result = gen_random(100.0);
17
}
18
//printf("%.9f\n", result);
19
return(0);
20
}
21
}