// Float object that can be referenced to get float values from a backing config
328285
func (c *Distconf) Float(key string, defaultVal float64) *Float {
	c.grabInfo(key)
	s := &floatConf{
		defaultVal: defaultVal,
		Float: Float{
			currentVal: math.Float64bits(defaultVal),
		},
	}
	// Note: in race conditions 's' may not be the thing actually returned
	ret, okCast := c.createOrGet(key, s).(*floatConf)
	if !okCast {
		c.Logger.Log(logkey.DistconfKey, key, "Registering key with multiple types!  FIX ME!!!!")
		return nil
	}
	return &ret.Float
}
118739
func (f *FloatRule) Default() ctypes.ConfigValue {
	if f.default_ != nil {
		return ctypes.ConfigValueFloat{Value: *f.default_}
	}
	return nil
}
308881
func (f *Queries) Float32(key string) (float32, error) {
	s, err := f.String(key)
	if err != nil {
		return 0, err
	}
	v, err := strconv.ParseFloat(s, 64)
	return float32(v), err
}
556561
func ToFloat(value interface{}) float64 {
	if result := ToString(value); result == "" {
		return 0
	} else if i, err := strconv.ParseFloat(result, 64); err == nil {
		return i
	} else {
		panic("failed to parse float: " + result)
	}
}
965294
func (reader PluginConfigReaderWithError) GetFloat(key string, defaultValue float64) (float64, error) {
	key = reader.config.registerKey(key)
	if reader.HasValue(key) {
		return reader.config.Settings.Float(key)
	}
	return defaultValue, nil
}
777999
func (*GoFlags) Float64(o string, d float64, c string) *float64 {
	return flag.Float64(o, d, c)
}
1173657
func (s *Session) GetFloat(key string, def float64) float64 {
	v, ok := s.Values[key]
	if !ok {
		return def
	}

	return v.(float64)
}
1096936
func (v *Object) GetFloat64(keys ...string) (float64, error) {
	child, err := v.getPath(keys)

	if err != nil {
		return 0, err
	} else {

		n, err := child.Float64()

		if err != nil {
			return 0, err
		} else {
			return n, nil
		}
	}
}
1364334
func keyFloat(v reflect.Value) (f float64, ok bool) {
	switch v.Kind() {
	case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:
		return float64(v.Int()), true
	case reflect.Float32, reflect.Float64:
		return v.Float(), true
	case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr:
		return float64(v.Uint()), true
	case reflect.Bool:
		if v.Bool() {
			return 1, true
		}
		return 0, 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
}
1348662
func (r *Reply) Float() (float64, error) {
	s, err := r.String()
	if err != nil {
		return 0, err
	}
	return strconv.ParseFloat(s, 64)
}
22239
func (ini *INI) SectionGetFloat(section, key string) (float64, bool) {
    v, ok := ini.SectionGet(section, key)
    if ok {
        v, err := strconv.ParseFloat(v, 64)
        if err == nil {
            return v, true
        }
    }

    return 0.0, ok
}
196605
func Float(input interface{}) (output float64, err error) {

	switch castValue := input.(type) {
	case Floater:
		output = castValue.Float()
		return
	case string:
		output, err = strconv.ParseFloat(castValue, 64)
	case []byte:
		output, err = strconv.ParseFloat(string(castValue), 64)
		return
	case int:
		output = float64(castValue)
		return
	case int8:
		output = float64(castValue)
		return
	case int16:
		output = float64(castValue)
		return
	case int32:
		output = float64(castValue)
		return
	case int64:
		output = float64(castValue)
		return
	case uint:
		output = float64(castValue)
		return
	case uint8:
		output = float64(castValue)
		return
	case uint16:
		output = float64(castValue)
		return
	case uint32:
		output = float64(castValue)
		return
	case uint64:
		output = float64(castValue)
		return
	case float32:
		output = float64(castValue)
		return
	case float64:
		output = float64(castValue)
		return
	case bool:
		output = float64(0)
		if castValue {
			output = float64(1)
		}
		return
	case nil:
		output = float64(0)
		return
	default:
		err = NewCastError("Could not convert to float64")
	}
	return
}
1303554
func (d Data) GetFloat(key string) float64 {
	if !d.KeyExists(key) || len(d.Values[key]) == 0 {
		return 0.0
	}
	str := d.Get(key)
	if result, err := strconv.ParseFloat(str, 64); err != nil {
		panic(err)
	} else {
		return result
	}
}
849055
func Float(v float64) *float64 {
	ptr := new(float64)
	*ptr = v
	return ptr
}
1251337
func (list *List) GetFloat(idx int) (float64, error) {
	value, err := list.Get(idx)
	if err != nil {
		return float64(0), err
	}

	switch value.(type) {
	case *Primative:
		return value.(*Primative).AsFloat()
	}

	return float64(0), errors.New("could not convert non-primative value to float")
}
6079
func Float(min, max float64) (float64, error) {
	return min + Rnd.Float64()*(max-min), nil
}