OpenACC: Difference between revisions

Jump to navigation Jump to search
Line 25: Line 25:
<tabs>
<tabs>
<tab name="C">
<tab name="C">
The following example computes an approximation of the transcendental number pi, using the well-known but slowly convergent formula arctan series expansion,  
The following example computes an approximation of the transcendental number <math>\pi</math>, using an approximation to a definite integral,  
{{File
{{File
   |name=pi.c
   |name=pi.c
Line 32: Line 32:
#include <stdio.h>
#include <stdio.h>


const long long N=2000000000;
const int vl = 512;
const int vl=512;
const long long N = 2000000000;


int main(int argc,char** argv) {
int main(int argc,char** argv) {
Bureaucrats, cc_docs_admin, cc_staff
2,314

edits

Navigation menu