private long inverse(double current) {
    // Represent to base b.
    short[] digits = new short[maxi];
    for(int j = 0; j < maxi; j++) {
      current *= base;
      digits[j] = (short) current;
      current -= digits[j];
      if(current <= 1e-10) {
        break;
      }
    }
    long inv = 0;
    for(int j = maxi - 1; j >= 0; j--) {
      inv = inv * base + digits[j];
    }
    return inv;
  }
private long inverse ( double current ) { short [ ] digits = new short [ maxi ] ; for ( int j = 0 ; j < maxi ; j ++ ) { current *= base ; digits [ j ] = ( short ) current ; current -= digits [ j ] ; if ( current <= 1e-10 ) { break ; } } long inv = 0 ; for ( int j = maxi - 1 ; j >= 0 ; j -- ) { inv = inv * base + digits [ j ] ; } return inv ; }
Compute the inverse with respect to the given base.

@param current Current value
@return Integer inverse