summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPixel <Pixel>2001-06-07 15:14:58 +0000
committerPixel <Pixel>2001-06-07 15:14:58 +0000
commitdc1c23b074f96c9302e03856eca18030f2964b1c (patch)
tree317df29e912fafa04fd42dd28165e29dbda67574
parentcb65b28cc78f728b1f1e3b4910333602e4b2855d (diff)
Pfff....HEADmaster
-rw-r--r--include/scalaires.h2
-rw-r--r--lib/scalaires.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/include/scalaires.h b/include/scalaires.h
index 7ab1951..8ae90c3 100644
--- a/include/scalaires.h
+++ b/include/scalaires.h
@@ -19,7 +19,7 @@ rationnel rat_constr_zero(void); /*
* renvoie 0
*/
-rationnel rat_constr(unsigned long long num, unsigned long long denom); /*
+rationnel rat_constr(long long num, long long denom); /*
* cree une fraction
*/
diff --git a/lib/scalaires.c b/lib/scalaires.c
index be98e0f..4276487 100644
--- a/lib/scalaires.c
+++ b/lib/scalaires.c
@@ -48,7 +48,7 @@ rationnel rat_constr_zero(void)
return temp;
}
-rationnel rat_constr(unsigned long long num, unsigned long long denom)
+rationnel rat_constr(long long num, long long denom)
{ /*
* cree une fraction
*/
@@ -68,7 +68,7 @@ rationnel rat_constr(unsigned long long num, unsigned long long denom)
temp.num = 0;
temp.denom = 1;
} else if (denom) {
- temp.num = sgnnum * sgndenom * num / pgcd(num, denom);
+ temp.num = sgnnum * sgndenom * (num / pgcd(num, denom));
temp.denom = denom / pgcd(num, denom);
} else {
exception(2, _("rat_constr: division by zero"));