code: func (qfd *quantizedFloatDecoder) validateFlags() {
  	// Check that we have some flags set
  	if qfd.Flags == 0 {
  		return
  	}
  
  	// Discard zero flag when encoding min / max set to 0
  	if (qfd.Low == 0.0 && (qfd.Flags&qff_rounddown) != 0) || (qfd.High == 0.0 && (qfd.Flags&qff_roundup) != 0) {
  		qfd.Flags &= ^qff_encode_zero
  	}
  
  	// If min / max is zero when encoding zero, switch to round up / round down instead
  	if qfd.Low == 0.0 && (qfd.Flags&qff_encode_zero) != 0 {
  		qfd.Flags |= qff_rounddown
  		qfd.Flags &= ^qff_encode_zero
  	}
  
  	if qfd.High == 0.0 && (qfd.Flags&qff_encode_zero) != 0 {
  		qfd.Flags |= qff_roundup
  		qfd.Flags &= ^qff_encode_zero
  	}
  
  	// Check if the range spans zero
  	if qfd.Low > 0.0 || qfd.High < 0.0 {
  		qfd.Flags &= ^qff_encode_zero
  	}
  
  	// If we are left with encode zero, only leave integer flag
  	if (qfd.Flags & qff_encode_integers) != 0 {
  		qfd.Flags &= ^(qff_roundup | qff_rounddown | qff_encode_zero)
  	}
  
  	// Verify that we don;t have roundup / rounddown set
  	if qfd.Flags&(qff_rounddown|qff_roundup) == (qff_rounddown | qff_roundup) {
  		_panicf("Roundup / Rounddown are mutually exclusive")
  	}
  }
docs: // Validates / recomputes decoder flags