summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/scalaires.c4
1 files changed, 2 insertions, 2 deletions
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"));