code: func (d *MyDecimal) digitBounds() (start, end int) {
  	var i int
  	bufBeg := 0
  	bufLen := digitsToWords(int(d.digitsInt)) + digitsToWords(int(d.digitsFrac))
  	bufEnd := bufLen - 1
  
  	/* find non-zero digit from number beginning */
  	for bufBeg < bufLen && d.wordBuf[bufBeg] == 0 {
  		bufBeg++
  	}
  	if bufBeg >= bufLen {
  		return 0, 0
  	}
  
  	/* find non-zero decimal digit from number beginning */
  	if bufBeg == 0 && d.digitsInt > 0 {
  		i = (int(d.digitsInt) - 1) % digitsPerWord
  		start = digitsPerWord - i - 1
  	} else {
  		i = digitsPerWord - 1
  		start = bufBeg * digitsPerWord
  	}
  	if bufBeg < bufLen {
  		start += countLeadingZeroes(i, d.wordBuf[bufBeg])
  	}
  
  	/* find non-zero digit at the end */
  	for bufEnd > bufBeg && d.wordBuf[bufEnd] == 0 {
  		bufEnd--
  	}
  	/* find non-zero decimal digit from the end */
  	if bufEnd == bufLen-1 && d.digitsFrac > 0 {
  		i = (int(d.digitsFrac)-1)%digitsPerWord + 1
  		end = bufEnd*digitsPerWord + i
  		i = digitsPerWord - i + 1
  	} else {
  		end = (bufEnd + 1) * digitsPerWord
  		i = 1
  	}
  	end -= countTrailingZeroes(i, d.wordBuf[bufEnd])
  	return start, end
  }
docs: /*
    digitBounds returns bounds of decimal digits in the number.
  
        start - index (from 0 ) of first decimal digits.
        end   - index of position just after last decimal digit.
  */