code: func (q *Quantity) ScaledValue(scale Scale) int64 {
  	if q.d.Dec == nil {
  		i, _ := q.i.AsScaledInt64(scale)
  		return i
  	}
  	dec := q.d.Dec
  	return scaledValue(dec.UnscaledBig(), int(dec.Scale()), int(scale.infScale()))
  }
docs: // ScaledValue returns the value of ceil(q * 10^scale); this could overflow an int64.
  // To detect overflow, call Value() first and verify the expected magnitude.