code: func NewMaxOrMinDec(negative bool, prec, frac int) *MyDecimal {
  	str := make([]byte, prec+2)
  	for i := 0; i < len(str); i++ {
  		str[i] = '9'
  	}
  	if negative {
  		str[0] = '-'
  	} else {
  		str[0] = '+'
  	}
  	str[1+prec-frac] = '.'
  	dec := new(MyDecimal)
  	err := dec.FromString(str)
  	terror.Log(errors.Trace(err))
  	return dec
  }
docs: // NewMaxOrMinDec returns the max or min value decimal for given precision and fraction.