// SliceFloat64 marshals the given []float64 s
327827
func (enc *Encoder) SliceFloat64(s []float64) {
	enc.Array(EncodeArrayFunc(func(enc *Encoder) {
		for _, i := range s {
			enc.Float64(i)
		}
	}))
}
1226259
func (d *Decoder) DecodeFloat64() (float64, error) {
	c, err := d.readCode()
	if err != nil {
		return 0, err
	}
	return d.float64(c)
}
53726
func (a *Array) Float64(f float64) *Array {
	a.buf = enc.AppendFloat64(enc.AppendArrayDelim(a.buf), f)
	return a
}
752038
func (c *client) Float64(key string, fallback float64) float64 {
	if f, err := strconv.ParseFloat(c.Getenv(key), 64); err == nil {
		return f
	}

	return fallback
}
578141
func (k *Key) RangeFloat64(defaultVal, min, max float64) float64 {
	val := k.MustFloat64()
	if val < min || val > max {
		return defaultVal
	}
	return val
}
990926
func (f *Queries) Float64(key string) (float64, error) {
	s, err := f.String(key)
	if err != nil {
		return 0, err
	}
	return strconv.ParseFloat(s, 64)
}
732251
func (fa *Float64Array) Float64ArrayOr(or []float64) []float64 {
	switch {
	case fa == nil:
		return or
	case !fa.Valid:
		return or
	default:
		return fa.Float64Array
	}
}
958238
func (j *Json) Float64() (float64, error) {
	switch j.data.(type) {
	case json.Number:
		return j.data.(json.Number).Float64()
	case float32, float64:
		return reflect.ValueOf(j.data).Float(), nil
	case int, int8, int16, int32, int64:
		return float64(reflect.ValueOf(j.data).Int()), nil
	case uint, uint8, uint16, uint32, uint64:
		return float64(reflect.ValueOf(j.data).Uint()), nil
	}
	return 0, errors.New("invalid value type")
}
406624
func (enc *Encoder) AddSliceFloat64Key(k string, s []float64) {
	enc.SliceFloat64Key(k, s)
}
473298
func (enc *Encoder) SliceFloat64Key(k string, s []float64) {
	enc.ArrayKey(k, EncodeArrayFunc(func(enc *Encoder) {
		for _, i := range s {
			enc.Float64(i)
		}
	}))
}
1046010
func (v *value) AsFloat64(dv float64) float64 {
	if v.IsUndefined() {
		return dv
	}
	switch tv := v.raw.(type) {
	case string:
		f, err := strconv.ParseFloat(tv, 64)
		if err != nil {
			return dv
		}
		return f
	case int:
		return float64(tv)
	case float64:
		return tv
	case bool:
		if tv {
			return 1.0
		}
		return 0.0
	}
	return dv
}
473355
func Float64(name string, value float64, usage string) *float64 {
	return CommandLine.Float64(name, value, usage)
}
958564
func (c *Context) Float64(name string) float64 {
	return lookupFloat64(name, c.flagSet)
}
187810
func (c *Config) GetFloat64(key string) (f float64) {
	f, _ = c.GetFloat64Ok(key)
	return
}
1070578
func Float64s(data []float64) []float64 {
	sort.Float64s(data)
	n := Uniq(sort.Float64Slice(data))
	return data[:n]
}
572252
func toFloat64(v reflect.Value) float64 {
	f, _ := tryToFloat64(v)
	return f
}
441843
func ConvertToFloat64(v interface{}) (float64, error) {
	switch i := v.(type) {
	case float64:
		return float64(i), nil
	case float32:
		return float64(i), nil
	case int64:
		return float64(i), nil
	case int32:
		return float64(i), nil
	case int16:
		return float64(i), nil
	case int8:
		return float64(i), nil
	case uint64:
		return float64(i), nil
	case uint32:
		return float64(i), nil
	case uint16:
		return float64(i), nil
	case uint8:
		return float64(i), nil
	case int:
		return float64(i), nil
	case uint:
		return float64(i), nil
	case string:
		f, err := strconv.ParseFloat(i, 64)
		if err != nil {
			return math.NaN(), err
		}
		return f, err
	default:
		return math.NaN(), fmt.Errorf("Cannot convert %s to float64", i)
	}
}