aboutsummaryrefslogtreecommitdiff
path: root/ic-reals-6.3/tests/pi.c
blob: 655e35cae4ed026194896fc59e0fe42048a49173 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#include <stdio.h>
#include "real.h"

/*
 * Prints pi (in base 10) to the specified number of digits.
 */
main(int argc, char *argv[])
{
	MyName = argv[0];

	if (argc != 2) {
		fprintf(stderr, "%s <n>\n", MyName);
		exit(1);
	}

	initReals();

	print_R_Dec(Pi, atoi(argv[1]));
	printf("\n");
}