From c2e3917d6b1feab90c3632fb76acacd672ff9e06 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Thu, 30 Oct 2014 15:19:08 -0600 Subject: Better comments! --- src/number.cpp | 5 +++-- 1 file 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 if( r.aFrac.getSize() != iScale ) r.aFrac = PackedIntArray( aFrac.getBitWidth(), iScale ); - // The numerator is re-created every step to match the divisor and - // anchor + // We seed the numerator with the bare minimum data that we potentially + // need to actually divide. We need at least as many digits in the + // numerator segment as we have in the denominator. Number nNum( iScale, iRadix ); for( int j = iAnchor-iNumShift; nNum.aInt.getSize() < nDiv.aInt.getSize(); j++ ) -- cgit v1.2.3