summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/number.cpp3
-rw-r--r--src/packedintarray.h1
2 files changed, 3 insertions, 1 deletions
diff --git a/src/number.cpp b/src/number.cpp
index c23466e..be9b8be 100644
--- a/src/number.cpp
+++ b/src/number.cpp
@@ -483,9 +483,10 @@ void Number::divide( const Number &rhs, Number &q, Number &r ) const
483 for(; nNum.aInt[jtop] == 0; jtop++ ) { } 483 for(; nNum.aInt[jtop] == 0; jtop++ ) { }
484// Bu::println("Computing remainder fraction from %1 to %2") 484// Bu::println("Computing remainder fraction from %1 to %2")
485// .arg( -iAnchor-1 ).arg( jtop ); 485// .arg( -iAnchor-1 ).arg( jtop );
486 r.aFrac.clear();
486 for( int j = -iAnchor-1, k = 0; j >= jtop && k < r.iScale; j--, k++ ) 487 for( int j = -iAnchor-1, k = 0; j >= jtop && k < r.iScale; j--, k++ )
487 { 488 {
488 if( j <= nNum.aInt.getSize() ) 489 if( j < nNum.aInt.getSize() )
489 { 490 {
490 r.aFrac.set( k, nNum.aInt[j] ); 491 r.aFrac.set( k, nNum.aInt[j] );
491// Bu::println("setting %1 to %2").arg( k ).arg( nNum.aInt[j] ); 492// Bu::println("setting %1 to %2").arg( k ).arg( nNum.aInt[j] );
diff --git a/src/packedintarray.h b/src/packedintarray.h
index 4ac0bc7..eb7b25a 100644
--- a/src/packedintarray.h
+++ b/src/packedintarray.h
@@ -21,6 +21,7 @@ public:
21 void set( int idx, Unit i ); 21 void set( int idx, Unit i );
22 void insert( int idx, Unit i ); 22 void insert( int idx, Unit i );
23 int getSize() const { return iCount; } 23 int getSize() const { return iCount; }
24 void setSize( int iNewSize );
24 void set( const PackedIntArray &rSrc, int iStart, int iSize ); 25 void set( const PackedIntArray &rSrc, int iStart, int iSize );
25 void set( const PackedIntArray &rSrc ); 26 void set( const PackedIntArray &rSrc );
26 void copy( int iDest, const PackedIntArray &rSrc, int iStart, int iSize ); 27 void copy( int iDest, const PackedIntArray &rSrc, int iStart, int iSize );