code: func (d *MyDecimal) ToUint() (uint64, error) {
  	if d.negative {
  		return 0, ErrOverflow
  	}
  	var x uint64
  	wordIdx := 0
  	for i := d.digitsInt; i > 0; i -= digitsPerWord {
  		y := x
  		x = x*wordBase + uint64(d.wordBuf[wordIdx])
  		wordIdx++
  		if y > math.MaxUint64/wordBase || x < y {
  			return math.MaxUint64, ErrOverflow
  		}
  	}
  	for i := d.digitsFrac; i > 0; i -= digitsPerWord {
  		if d.wordBuf[wordIdx] != 0 {
  			return x, ErrTruncated
  		}
  		wordIdx++
  	}
  	return x, nil
  }
docs: // ToUint returns int part of the decimal, returns the result and errcode.