Browse Source

Removing unused shift10 export.

Samuel Jaffe 8 years ago
parent
commit
6ca1a140ca
2 changed files with 0 additions and 6 deletions
  1. 0 1
      include/bignum_helper.h
  2. 0 5
      src/bignum_helper.cpp

+ 0 - 1
include/bignum_helper.h

@@ -18,5 +18,4 @@ namespace math { namespace detail {
   void subtract_nounderflow(data_type & rhs, data_type const & lhs, size_t offset = 0);
   void multiply(data_type & rhs, data_type const & lhs);
   data_type divide(data_type & remainder, data_type const & divisor);
-  data_type shift10(data_type const & data, int32_t places);
 } }

+ 0 - 5
src/bignum_helper.cpp

@@ -103,7 +103,6 @@ namespace math { namespace detail {
     
   data_type shift10(data_type const & data, int32_t places) {
     int32_t shift = places / SEG_DIGITS;
-    if (places < 0) { --shift; }
     int64_t const pow = powers[places - (shift * SEG_DIGITS)];
     size_t const bnd = data.size();
     data_type rval(size_t((int32_t)bnd + shift) + 1);
@@ -114,10 +113,6 @@ namespace math { namespace detail {
       rval[o] += int32_t(product - (overflow * OVER_SEG));
       rval[o+1] += int32_t(overflow);
     }
-    if (shift < 0) {
-      // TODO rounding
-      rval.erase(rval.begin(), rval.begin()-shift);
-    }
     if (rval.back() == 0 && rval.size() > 1) { rval.pop_back(); }
     return rval;
   }