diff options
author | Mike Buland <mike@xagasoft.com> | 2014-10-30 15:19:08 -0600 |
---|---|---|
committer | Mike Buland <mike@xagasoft.com> | 2014-10-30 15:19:08 -0600 |
commit | c2e3917d6b1feab90c3632fb76acacd672ff9e06 (patch) | |
tree | 8b1125e16d1abdd584d74fa4e828d193cb5af491 /src/number.cpp | |
parent | 24585306f072bed23d9898b66a7ef2e7b0f9d8a5 (diff) | |
download | clic-c2e3917d6b1feab90c3632fb76acacd672ff9e06.tar.gz clic-c2e3917d6b1feab90c3632fb76acacd672ff9e06.tar.bz2 clic-c2e3917d6b1feab90c3632fb76acacd672ff9e06.tar.xz clic-c2e3917d6b1feab90c3632fb76acacd672ff9e06.zip |
Better comments!
Diffstat (limited to '')
-rw-r--r-- | src/number.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/number.cpp b/src/number.cpp index 81aefbe..93ddc0a 100644 --- a/src/number.cpp +++ b/src/number.cpp | |||
@@ -429,8 +429,9 @@ void Number::divide( const Number &rhs, Number &q, Number &r ) const | |||
429 | if( r.aFrac.getSize() != iScale ) | 429 | if( r.aFrac.getSize() != iScale ) |
430 | r.aFrac = PackedIntArray( aFrac.getBitWidth(), iScale ); | 430 | r.aFrac = PackedIntArray( aFrac.getBitWidth(), iScale ); |
431 | 431 | ||
432 | // The numerator is re-created every step to match the divisor and | 432 | // We seed the numerator with the bare minimum data that we potentially |
433 | // anchor | 433 | // need to actually divide. We need at least as many digits in the |
434 | // numerator segment as we have in the denominator. | ||
434 | Number nNum( iScale, iRadix ); | 435 | Number nNum( iScale, iRadix ); |
435 | for( int j = iAnchor-iNumShift; | 436 | for( int j = iAnchor-iNumShift; |
436 | nNum.aInt.getSize() < nDiv.aInt.getSize(); j++ ) | 437 | nNum.aInt.getSize() < nDiv.aInt.getSize(); j++ ) |