diff options
author | Jakob Kaivo <jkk@ung.org> | 2022-03-28 16:34:27 -0400 |
---|---|---|
committer | Jakob Kaivo <jkk@ung.org> | 2022-03-28 16:34:27 -0400 |
commit | 8d2224f1227e8da595ff4db29d805908a91609bf (patch) | |
tree | 2c335138a02fa3b507fe034195dd13cccff0b553 /big.c | |
parent | e1d7c2294075f5a59e276bb2dd7af79772443234 (diff) |
rename bigcmp() to big_compare()
Diffstat (limited to 'big.c')
-rw-r--r-- | big.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -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) { |