repo.or.cz
/
frac.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Bihomographic functions.
[frac.git]
/
epow.c
blob
48c85f54fce76cea2c52ed56f5fc0e94da88e702
1
#include <stdio.h>
2
#include <stdlib.h>
3
#include <string.h>
4
#include <gmp.h>
5
#include
"cf.h"
6
7
int
main
() {
8
mpz_t z
;
9
mpz_init
(
z
);
10
mpz_set_ui
(
z
,
2
);
11
cf_t ep
,
conv
;
12
ep
=
cf_new_epow
(
z
);
13
14
conv
=
cf_new_cf_to_decimal
(
ep
);
15
for
(
int
i
=
0
;
i
<=
5000
;
i
++) {
16
cf_get
(
z
,
conv
);
17
gmp_printf
(
"%Zd"
,
z
);
18
if
(!(
i
%
5
))
putchar
(
' '
);
19
if
(!(
i
%
50
))
putchar
(
'
\n
'
);
20
}
21
cf_free
(
conv
);
22
cf_free
(
ep
);
23
mpz_clear
(
z
);
24
return
0
;
25
}