</syntaxhighlight>
'''Test runs:How we optimize and improved the code from assignment 2 is instead of using a randomized number we ask the user for input on pi calculation. <br/>
The error in PI estimation is how far it is from the known value of pi.
How '''Test runs: <br/>'''Run 1:<br/>n = 10[[File:10-Kernal-Blas.png]]<br/><br/>n = 1000[[File:1000-Kernal-Blas.png]]<br/><br/>n = 10000[[File:10000-Kernal-Blas.png]]<br/><br/>n = 100000[[File:100000-Kernal-Blas.png]]<br/><br/>n = 1000000[[File:1000000-Kernal-Blas.png]]<br/>Here is where an error occurs and onward where we optimize and improved the code is instead of using suspect that a randomized number we ask memory leak causes the user for input on problem resulting in an error in pi calculation.