Changes

Jump to: navigation, search

GPU610/DPS915 CUDA PI

83 bytes added, 01:25, 4 November 2013
Code Snippet
==== '''Code Snippet''' ====
// loops through user amount of rounds of sets of points  for(i = 0; i < points; i++) { x = randNum(); y = randNum(); // check if point resides within the circle if (((x*x) + (y*y)) <= 1.0) { score++; } // calculate pi pi = 4.0 * (float)score/(float)points;  
==== '''Compilation and Running''' ====

Navigation menu