code: func ProduceFloatWithSpecifiedTp(f float64, target *FieldType, sc *stmtctx.StatementContext) (_ float64, err error) {
  	// For float and following double type, we will only truncate it for float(M, D) format.
  	// If no D is set, we will handle it like origin float whether M is set or not.
  	if target.Flen != UnspecifiedLength && target.Decimal != UnspecifiedLength {
  		f, err = TruncateFloat(f, target.Flen, target.Decimal)
  		if err = sc.HandleOverflow(err, err); err != nil {
  			return f, errors.Trace(err)
  		}
  	}
  	if mysql.HasUnsignedFlag(target.Flag) && f < 0 {
  		return 0, overflow(f, target.Tp)
  	}
  	return f, nil
  }
docs: // ProduceFloatWithSpecifiedTp produces a new float64 according to `flen` and `decimal`.