diff options
author | Pixel <Pixel> | 2001-05-02 10:44:20 +0000 |
---|---|---|
committer | Pixel <Pixel> | 2001-05-02 10:44:20 +0000 |
commit | 744672b90fe21495913fc321633bc6d103e3cb6b (patch) | |
tree | e4ad06604ccb14022a61f01e3f7412fadcb1bdbc /lib/scalaires.c | |
parent | a0c6c21ab0d031376cb37b3f2b931a3ceabaa1b7 (diff) |
Pouet
Diffstat (limited to 'lib/scalaires.c')
-rw-r--r-- | lib/scalaires.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/scalaires.c b/lib/scalaires.c index d55c4b2..b9af70a 100644 --- a/lib/scalaires.c +++ b/lib/scalaires.c @@ -16,7 +16,7 @@ #define PRECISION 1E6 typedisplay display; -static int pgcd(int a, int b) +static unsigned long long pgcd(unsigned long long a, unsigned long long b) { if (a < b) return pgcd(b, a); @@ -35,7 +35,7 @@ rationnel rat_constr_zero(void) } -rationnel rat_constr(int num, int denom) +rationnel rat_constr(unsigned long long num, unsigned long long denom) { /* cree une fraction */ rationnel temp; int sgnnum = 1, sgndenom = 1; @@ -64,10 +64,7 @@ rationnel rat_constr(int num, int denom) rationnel rat_constr_from_double(double flt) { /* cree une fraction a partir d un double */ - return rat_constr(floor(flt * PRECISION), PRECISION); - - } void rat_destruct(rationnel rat) |