diff options
Diffstat (limited to '')
-rw-r--r-- | src/number.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/number.cpp b/src/number.cpp index 0f99792..8fc1d7f 100644 --- a/src/number.cpp +++ b/src/number.cpp | |||
@@ -407,6 +407,8 @@ void Number::divide( const Number &rhs, Number &q, Number &r ) const | |||
407 | if( rhs.isZero() ) | 407 | if( rhs.isZero() ) |
408 | { | 408 | { |
409 | q = rhs; | 409 | q = rhs; |
410 | // This should be infinity (or negative infinity?) | ||
411 | // but we don't support that yet. Still have to figure that bit out. | ||
410 | r.set( 0 ); | 412 | r.set( 0 ); |
411 | return; | 413 | return; |
412 | } | 414 | } |
@@ -416,6 +418,7 @@ void Number::divide( const Number &rhs, Number &q, Number &r ) const | |||
416 | r.set( 0 ); | 418 | r.set( 0 ); |
417 | return; | 419 | return; |
418 | } | 420 | } |
421 | |||
419 | DBS( DIVIDE, Bu::println("divide: %1 / %2").arg( *this ).arg( rhs ) ); | 422 | DBS( DIVIDE, Bu::println("divide: %1 / %2").arg( *this ).arg( rhs ) ); |
420 | 423 | ||
421 | // iNumShift is how many digits we've shifted the entire equation, | 424 | // iNumShift is how many digits we've shifted the entire equation, |
@@ -532,7 +535,6 @@ void Number::divide( const Number &rhs, Number &q, Number &r ) const | |||
532 | DBS( DIVIDE, Bu::println("Quotient: %1").arg( q ) ); | 535 | DBS( DIVIDE, Bu::println("Quotient: %1").arg( q ) ); |
533 | DBS( DIVIDE, Bu::println("Final numerator? %1").arg( nNum ) ); | 536 | DBS( DIVIDE, Bu::println("Final numerator? %1").arg( nNum ) ); |
534 | DBS( DIVIDE, Bu::println("Remainder? %1").arg( r ) ); | 537 | DBS( DIVIDE, Bu::println("Remainder? %1").arg( r ) ); |
535 | |||
536 | } | 538 | } |
537 | 539 | ||
538 | bool Number::isZero() const | 540 | bool Number::isZero() const |