File1: #include <stdio.h>\n#define num_steps 2000000000 \n\n#include <stdio.h>\nint main(int argc, char** argv)\n{\n  double pi = 0.0;\n  long int i;\n  double x, interval_width;\n  interval_width = 1.0/(double)num_steps;\n\n#pragma omp parallel for reduction(+:pi) private(x)\n  for (i = 0; i < num_steps; i++) {\n    x = (i+ 0.5) * interval_width;\n    pi += 1.0 / (x*x + 1.0);\n  }\n\n  pi = pi * 4.0 * interval_width;\n  printf ("PI=%f\n", pi);\n  return 0;\n}\n
File2: program DRB065_pireduction_orig_no\n    use omp_lib\n    implicit none\n\n    real(kind = 16) :: x, interval_width, pi\n    integer(kind = 8) :: i, num_steps\n\n    pi = 0.0\n    num_steps = 2000000000\n    interval_width = 1.0/num_steps\n\n    !$omp parallel do reduction(+:pi) private(x)\n    do i = 1, num_steps\n        x = (i + 0.5) * interval_width\n        pi = pi + 1.0 / (x*x + 1.0);\n    end do\n    !$omp end parallel do\n\n    pi = pi * 4.0 * interval_width;\n    print 100, pi\n    100 format ("PI =",F24.20)\n\nend program