From 8d2224f1227e8da595ff4db29d805908a91609bf Mon Sep 17 00:00:00 2001 From: Jakob Kaivo Date: Mon, 28 Mar 2022 16:34:27 -0400 Subject: rename bigcmp() to big_compare() --- big.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'big.c') 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) { -- cgit v1.2.1