repo.or.cz
/
voro++.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Strip extra spaces from code.
[voro++.git]
/
branches
/
exact
/
test.cc
blob
55e14011b95aac3f3c2da68633a239639327a2e8
1
#include <cstdio>
2
#include <cstdlib>
3
#include <cmath>
4
#include <gmpxx.h>
5
using namespace
std
;
6
7
int
main
() {
8
double
q
=
3
;
9
mpq_class a
,
b
;
10
11
a
=
"2/4"
;
12
b
=
q
;
13
b
*=
b
;
14
q
=
b
.
get_d
();
15
printf
(
"%g
\n
"
,
q
);
16
17
mpz_out_str
(
stdout
,
10
,
b
.
get_num_mpz_t
());
puts
(
""
);
18
mpz_out_str
(
stdout
,
10
,
b
.
get_den_mpz_t
());
puts
(
""
);
19
}