// MustFloat32 gets data float32 type
9392
func (c *secureCookies) MustFloat32(key string, defaults ...float32) float32 {
	ck, err := c.req.Cookie(key)
	if err != nil {
		if len(defaults) > 0 {
			return defaults[0]
		}
		return 0
	}
	s := parseSecureCookie(c.secret, ck.Value)
	v, err := strconv.ParseFloat(s, 32)
	if len(defaults) > 0 && err != nil {
		return defaults[0]
	}
	return float32(v)
}
992674
func (e *Entity) GetFloat32(name string) (float32, bool) {
	x, ok := e.Get(name).(float32)
	return x, ok
}
570663
func (r *MockResult) Float32(i int) float32 {
	if r.Contains(i) {
		return r.Result[i].(float32)
	} else {
		return 0
	}
}
522513
func MustFloat(input interface{}) float64 {
	output, err := Float(input)
	if err != nil {
		panic(err)
	}
	return output
}
392983
func (checkOverflow) Float32(v float64) (overflow bool) {
	if v < 0 {
		v = -v
	}
	return math.MaxFloat32 < v && v <= math.MaxFloat64
}
810341
func (enc *Encoder) AddFloat32Key(key string, v float32) {
	enc.Float32Key(key, v)
}
460984
func (c *cookies) Float32(key string) (float32, error) {
	ck, err := c.req.Cookie(key)
	if err != nil {
		return 0, err
	}
	v, err := strconv.ParseFloat(ck.Value, 32)
	return float32(v), err
}
1216219
func ContainsFloat32(s []float32, v float32) bool {
	for _, vv := range s {
		if vv == v {
			return true
		}
	}
	return false
}
1275197
func SumFloat32(s []float32) (sum float32) {
	for _, v := range s {
		sum += v
	}
	return
}
923548
func (c *Chunk) AppendFloat32(colIdx int, f float32) {
	c.columns[colIdx].appendFloat32(f)
}
124457
func TryToFloat32(i interface{}) (r float32, err error) {
	switch t := i.(type) {
	case float32:
		r = t
	case *float32:
		r = *t
	case float64:
		r = float32(t)
	case int:
		r = float32(t)
	case int8:
		r = float32(t)
	case int16:
		r = float32(t)
	case int32:
		r = float32(t)
	case int64:
		r = float32(t)
	case bool:
		if t {
			r = 1
		}
	case string:
		var v float64
		if v, err = strconv.ParseFloat(t, 32); err == nil {
			r = float32(v)
		}
	default:
		err = castError(i, "float32")
	}
	return
}
743337
func ToFloat64(v interface{}) float64 {
	if str, ok := v.(string); ok {
		return strToFloat64(str)
	}

	val := reflect.Indirect(reflect.ValueOf(v))
	switch val.Kind() {
	case reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64, reflect.Int:
		return float64(val.Int())
	case reflect.Uint8, reflect.Uint16, reflect.Uint32:
		return float64(val.Uint())
	case reflect.Uint, reflect.Uint64:
		return float64(val.Uint())
	case reflect.Float32, reflect.Float64:
		return val.Float()
	case reflect.Bool:
		if val.Bool() {
			return 1
		}
		return 0
	default:
		return 0
	}
}
1017470
func (d *Datum) GetFloat32() float32 {
	return float32(math.Float64frombits(uint64(d.i)))
}
758318
func (iter *Iterator) ReadFloat32() (ret float32) {
	c := iter.nextToken()
	if c == '-' {
		return -iter.readPositiveFloat32()
	}
	iter.unreadByte()
	return iter.readPositiveFloat32()
}
530008
func (e *Event) Floats32(key string, f []float32) *Event {
	if e == nil {
		return e
	}
	e.buf = enc.AppendFloats32(enc.AppendKey(e.buf, key), f)
	return e
}
1044210
func ToFloat(data interface{}) (float64, bool) {
	switch typed := data.(type) {
	case float64:
		return typed, true
	case float32:
		return float64(typed), true
	default:
		if n, ok := ToInt(data); ok {
			return float64(n), true
		}
		return 0, false
	}
}
893007
func (p *Params) Float32(key string) (float32, error) {
	v, err := strconv.ParseFloat(p.Get(key), 32)
	return float32(v), err
}