Montecarlo Java Results
Montecarlo Java Results
Montecarlo Java Results
CSCI 3366-1
Homework 2
Java Sequential
Difference from Pi
0.00085
0.0008
0.00075
0.0007
0.00065
0.0006
0.00055
0.0005
0.00045
0.0004 Difference from Pi
0.00035
0.0003
0.00025
0.0002
0.00015
0.0001
0.00005
0
1 2 3 4 5 6 7
500000 0.000768654
1000000 0.000776654
2000000 0.000331346
4000000 6.76536E-05
8000000 0.000354346
16000000 0.000123904
32000000 3.4714E-06
Java Parallel
0.0016
0.0015
0.0014
0.0013
0.0012
0.0011
0.001
0.0009
Seed 11
0.0008
Seed 103
0.0007
Seed 9973
0.0006
0.0005
0.0004
0.0003
0.0002
0.0001
0
1 2 3 4 5 6
Figure 2) Difference from Math.PI with 32,000,000 samples and the Seeds indicated.
Number of threads are indicated along the x-axis in terms of 2 to the N-1th power.
11
10.5
10
9.5
9
8.5
8
7.5
7
6.5
6
Seed 11
5.5
5 Seed 103
4.5 Seed 9973
4
3.5
3
2.5
2
1.5
1
0.5
0
1 2 3 4 5 6
Figure 3) Y-Axis time in seconds. X-Axis number of threads are indicated along the x-
axis in terms of 2 to the N-1th power.
Number of Threads Seed 11 Seed 103 Seed 9973