high performance computing

Gvtrexvat
timer Asked: May 1st, 2018

Question Description

i have final online exam 3 questions in high performance computing using C langauge ...................................

Unformatted Attachment Preview

2. Some techniques for computing the mathematical constant e=2.71828... accurately need infinite series. An infinite series is the sum of the terms of an infinite sequence. As we cannot find the sum of an infinite series by a computer, we approximate this sum by creating and summing as much element as we can. The speed of this process can be increased using a parallel computing approach. Approximate the e using Maclaurin Series given as: 1 1 ex = 1 + x + x2 -x+ + 24 120 1 1 +- x3 + -75. Please approximate e using Maclaurin Series using any of the libraries that you know (MPI, PTHREAD or OPENMP) Attach your code, and snapshots of all the results to this exam paper. Try at different numbers of processors and numbers of samples, and compare the results. (30 Points) 1 4. Suppose we toss darts randomly at a square dartboard, as seen in the Figure, and whose sides are 1 foot in length. Suppose also that there's a quarter circle inscribed in the square dartboard. The radius of the circle is 1 foot, and its area is a/4 square feet. If the points that are hit by the darts are uniformly distributed (and we always hit the square), then the number of darts that hit inside the circle should approximately satisfy the equation: . 1 number in circle π tota number of tosses 4 , since the ratio of the area of the circle to the area of the square is a/4. We can use this formula to estimate the value of with a random number generator using the given serial code: number_in_circle = 0; for (toss = 0; toss < number_of_tosses; toss++) { x = random double between 0 and 1; y = random double between 0 and 1; distance_squared = x*x + y*y; if (distance_squared
User generated content is uploaded by users for the purposes of learning and should be used following Studypool's honor code & terms of service.

This question has not been answered.

Create a free account to get help with this and any other question!

Related Tags

Brown University





1271 Tutors

California Institute of Technology




2131 Tutors

Carnegie Mellon University




982 Tutors

Columbia University





1256 Tutors

Dartmouth University





2113 Tutors

Emory University





2279 Tutors

Harvard University





599 Tutors

Massachusetts Institute of Technology



2319 Tutors

New York University





1645 Tutors

Notre Dam University





1911 Tutors

Oklahoma University





2122 Tutors

Pennsylvania State University





932 Tutors

Princeton University





1211 Tutors

Stanford University





983 Tutors

University of California





1282 Tutors

Oxford University





123 Tutors

Yale University





2325 Tutors