Bureaucrats, cc_docs_admin, cc_staff
2,314
edits
(Tabs and file format for easy download) |
|||
Line 25: | Line 25: | ||
<tabs> | <tabs> | ||
<tab name="C"> | <tab name="C"> | ||
The following example computes an approximation of | The following example computes an approximation of the transcendental number pi, using the well-known but slowly convergent formula arctan series expansion, | ||
{{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; | |||
int main( | int main(int argc,char** argv) { | ||
double pi = 0.0f; | double pi = 0.0f; | ||
long long i; | long long i; |