summaryrefslogtreecommitdiff
path: root/big.c
diff options
context:
space:
mode:
Diffstat (limited to 'big.c')
-rw-r--r--big.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/big.c b/big.c
index 835706c..8396d48 100644
--- a/big.c
+++ b/big.c
@@ -154,7 +154,7 @@ static struct big_div big__shortdiv(word x, word n)
/* may assume - x>=0,y>0 */
static struct big_div big__longdiv(word x, word y)
{
- if (bigcmp(x, y) < 0) {
+ if (big_compare(x, y) < 0) {
struct big_div bd = {
.quo = make(INT, 0, 0),
.rem = x,
@@ -175,7 +175,7 @@ static struct big_div big__longdiv(word x, word y)
word n = 0;
word q = 0;
word ly = big__len(y);
- while (bigcmp(x, y = make(INT, 0, y)) >= 0) {
+ while (big_compare(x, y = make(INT, 0, y)) >= 0) {
n++;
}
@@ -187,7 +187,7 @@ static struct big_div big__longdiv(word x, word y)
d = 0;
} else if (lx == ly) {
- if (bigcmp(x, y) >= 0) {
+ if (big_compare(x, y) >= 0) {
x = bigsub(x, y);
d = 1;
} else {
@@ -206,9 +206,9 @@ static struct big_div big__longdiv(word x, word y)
d = 0;
}
- if (bigcmp(x, y) >= 0) {
+ if (big_compare(x, y) >= 0) {
x = bigsub(x, y), d++;
- if (bigcmp(x, y) >= 0) {
+ if (big_compare(x, y) >= 0) {
x = bigsub(x, y);
d++;
}
@@ -463,7 +463,7 @@ word bigsub(word x, word y)
}
/* returns +ve,0,-ve as x greater than, equal, less than y */
-int bigcmp(word x, word y)
+int big_compare(word x, word y)
{
word s = big_is_negative(x);
if (big_is_negative(y) != s) {