repo.or.cz
/
barvinok.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
genfun.cc: move coefficient computation to short_rat
[barvinok.git]
/
mpz_divisible_p.c
blob
160c6ba56348af8b82b4c06c2e6eed8b146fea43
1
#include <gmp.h>
2
3
int
mpz_divisible_p
(
mpz_t N
,
mpz_t D
)
4
{
5
int
d
;
6
mpz_t r
;
7
mpz_init
(
r
);
8
mpz_fdiv_r
(
r
,
N
,
D
);
9
d
=
mpz_sgn
(
r
) ==
0
;
10
mpz_clear
(
r
);
11
return
d
;
12
}