// Float32 returns the value associated with the key as a float32.
509234
func (s *Session) Float32(key string) float32 {
	s.RLock()
	defer s.RUnlock()

	v, ok := s.data[key]
	if !ok {
		return 0
	}

	value, ok := v.(float32)
	if !ok {
		return 0
	}
	return value
}
969992
func (r Row) GetFloat32(colIdx int) float32 {
	col := r.c.columns[colIdx]
	return *(*float32)(unsafe.Pointer(&col.data[r.idx*4]))
}
707054
func PackFloat32(cmd BufferEx, val float32) (int, error) {
	return packFloat32(cmd, val)
}
613500
func Float32P(val string) (*float32, error) {
	f, err := Float32(val)
	if err != nil {
		return nil, err
	}
	return proto.Float32(f), nil
}
992674
func (e *Entity) GetFloat32(name string) (float32, bool) {
	x, ok := e.Get(name).(float32)
	return x, ok
}
139851
func (p Properties) Float(key string, def float64) float64 {
	if v, found := p[key]; found {
		if b, err := strconv.ParseFloat(v, 64); err == nil {
			return b
		}
	}
	return def
}
454724
func (ctx *Context) FormFloat32(key string, defaults ...float32) float32 {
	return (*Forms)(ctx.req).MustFloat32(key, defaults...)
}
1340704
func (s *Session) PopFloat32(key string) float32 {
	r, _ := s.Pop(key).(float32)
	return r
}
99330
func (ctx *Context) QueryFloat32(key string, defaults ...float32) float32 {
	return (*Queries)(ctx.req).MustFloat32(key, defaults...)
}
120954
func (e Entry) Float32Default(key string, def float32) (float32, error) {
	v := e.ValueRaw
	if v == nil {
		return def, errFindParse.Format("float32", e.Key)
	}

	switch vv := v.(type) {
	case string:
		val, err := strconv.ParseFloat(vv, 32)
		if err != nil {
			return def, err
		}
		if val > math.MaxFloat32 {
			return def, errFindParse.Format("float32", e.Key)
		}
		return float32(val), nil
	case float32:
		return vv, nil
	case float64:
		if vv > math.MaxFloat32 {
			return def, errFindParse.Format("float32", e.Key)
		}
		return float32(vv), nil
	case int:
		return float32(vv), nil
	}

	return def, errFindParse.Format("float32", e.Key)
}
1074851
func (mmap MarshalMap) Float(key string) (float64, error) {
	val, exists := mmap.Value(key)
	if !exists {
		return 0, fmt.Errorf(`"%s" is not set`, key)
	}

	if floatVal, isNumber := treflect.Float64(val); isNumber {
		return floatVal, nil
	}

	return 0, fmt.Errorf(`"%s" is expected to be a signed number type`, key)
}
433927
func (r *Reader) ReadFloat32() float32 {
	tag := r.readByte()
	decoder := float32Decoders[tag]
	if decoder == nil {
		castError(tag, "float32")
	}
	return decoder(r)
}
1030998
func GetFloat(key string) (float64, error) {
	value, err := Get(key)
	if err != nil {
		return 0, err
	}
	switch v := value.(type) {
	case float64:
		return v, nil
	case float32:
		return float64(v), nil
	case int:
		return float64(v), nil
	case string:
		if floatVal, err := strconv.ParseFloat(v, 64); err == nil {
			return floatVal, nil
		}
	}
	return 0, &InvalidValue{key, "float"}
}
810341
func (enc *Encoder) AddFloat32Key(key string, v float32) {
	enc.Float32Key(key, v)
}
1076473
func Float64() float64 {
	mu.Lock()
	res := r.Float64()
	mu.Unlock()
	return res
}
674898
func Float32() gopter.Gen {
	return gopter.CombineGens(
		Int32Range(0, 1),
		Int32Range(0, 0xfe),
		Int32Range(0, 0x7fffff),
	).Map(func(values []interface{}) float32 {
		sign := uint32(values[0].(int32))
		exponent := uint32(values[1].(int32))
		mantissa := uint32(values[2].(int32))

		return math.Float32frombits((sign << 31) | (exponent << 23) | mantissa)
	}).WithShrinker(Float32Shrinker)
}
889038
func Float32(v interface{}) (float32, bool) {

	switch reflect.TypeOf(v).Kind() {
	case reflect.Int:
		return float32(v.(int)), true
	case reflect.Uint:
		return float32(v.(uint)), true
	case reflect.Int8:
		return float32(v.(int8)), true
	case reflect.Uint8:
		return float32(v.(uint8)), true
	case reflect.Int16:
		return float32(v.(int16)), true
	case reflect.Uint16:
		return float32(v.(uint16)), true
	case reflect.Int32:
		return float32(v.(int32)), true
	case reflect.Uint32:
		return float32(v.(uint32)), true
	case reflect.Int64:
		return float32(v.(int64)), true
	case reflect.Uint64:
		return float32(v.(uint64)), true
	case reflect.Float32:
		return v.(float32), true
	case reflect.Float64:
		return float32(v.(float64)), true
	}

	return 0, false
}