diff options
Diffstat (limited to 'big.c')
-rw-r--r-- | big.c | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -551,13 +551,15 @@ word longdiv(word x, word y) } } /* see Bird & Wadler p82 for explanation */ -word len(x) /* no of digits in big x */ -word x; +/* no of digits in big x */ +word len(word x) { word n = 1; - while (x = rest(x)) + while (x = rest(x)) { n++; - return (n); + } + + return n; } word msd(x) /* most significant digit of big x */ |