blob: 4fb1e6cff980578516a9d27e69a83b8db6166609 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
#include <stdio.h>
#include "real.h"
#include <math.h>
/*
* Tests the tan_QZ when applied to a rational.
*/
main(int argc, char *argv[])
{
Real x, y;
double f;
mpz_t a, b;
MyName = argv[0];
if (argc != 4) {
fprintf(stderr, "%s <a> <b> <ndigits>\n", MyName);
exit(1);
}
initReals();
mpz_init_set_str(a, argv[1], 10);
mpz_init_set_str(b, argv[2], 10);
x = tan_QZ(a, b);
print_R_Dec(x, atoi(argv[3]));
printf("\n");
}
|