// Float64Slice returns a slice of float64 pointers given a slice of float64s.
191665
func Float64Slice(v []float64) []*float64 {
	out := make([]*float64, len(v))
	for i := range v {
		out[i] = &v[i]
	}
	return out
}
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
}
251529
func (e *Event) Float64(key string, f float64) *Event {
	if e == nil {
		return e
	}
	e.buf = enc.AppendFloat64(enc.AppendKey(e.buf, key), f)
	return e
}
344646
func (mmap MarshalMap) Int64Slice(key string) ([]int64, error) {
	return mmap.Int64Array(key)
}
95812
func (g *Group) Float64() *Statement {
	// notest
	s := Float64()
	g.items = append(g.items, s)
	return s
}
473298
func (enc *Encoder) SliceFloat64Key(k string, s []float64) {
	enc.ArrayKey(k, EncodeArrayFunc(func(enc *Encoder) {
		for _, i := range s {
			enc.Float64(i)
		}
	}))
}
116755
func Float32Slice(val, sep string) ([]float32, error) {
	s := strings.Split(val, sep)
	values := make([]float32, len(s))
	for i, v := range s {
		value, err := Float32(v)
		if err != nil {
			return values, err
		}
		values[i] = value
	}
	return values, nil
}
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")
}
1002010
func Float64Slice(val, sep string) ([]float64, error) {
	s := strings.Split(val, sep)
	values := make([]float64, len(s))
	for i, v := range s {
		value, err := Float64(v)
		if err != nil {
			return values, err
		}
		values[i] = value
	}
	return values, nil
}
975623
func NewFloats64(into *[]float64, v []float64) *Floats64Value {
	*into = v
	return (*Floats64Value)(into)
}
598323
func ToFloat64E(i interface{}) (float64, error) {
	i = indirect(i)

	switch s := i.(type) {
	case float64:
		return s, nil
	case float32:
		return float64(s), nil
	case int:
		return float64(s), nil
	case int64:
		return float64(s), nil
	case int32:
		return float64(s), nil
	case int16:
		return float64(s), nil
	case int8:
		return float64(s), nil
	case uint:
		return float64(s), nil
	case uint64:
		return float64(s), nil
	case uint32:
		return float64(s), nil
	case uint16:
		return float64(s), nil
	case uint8:
		return float64(s), nil
	case string:
		v, err := strconv.ParseFloat(s, 64)
		if err == nil {
			return v, nil
		}
		return 0, fmt.Errorf("unable to cast %#v of type %T to float64", i, i)
	case bool:
		if s {
			return 1, nil
		}
		return 0, nil
	default:
		return 0, fmt.Errorf("unable to cast %#v of type %T to float64", i, i)
	}
}
901278
func ToInt64Slice(i interface{}, d ...[]int64) (r []int64) {
	v, err := TryToInt64Slice(i)
	if err != nil && len(d) > 0 {
		return d[0]
	}
	return v
}
254035
func appendSlice(slice, data []byte) []byte {
	slice = append(slice, data...)
	return slice
}
534451
func NewFloat64(into *float64, v float64) *Float64Value {
	*into = v
	return (*Float64Value)(into)
}
1190076
func Uint64Slice(src []uint64) []*uint64 {
	dst := make([]*uint64, len(src))
	for i := 0; i < len(src); i++ {
		dst[i] = &(src[i])
	}
	return dst
}
1295207
func GetFloat64(key string, defaultValue float64) float64 {
	result, err := factory.GetValue(key).ToFloat64()
	if err != nil {
		return defaultValue
	}
	return result
}
620531
func Float64s(input []float64) []float64 {
	u := make([]float64, 0, len(input))
	m := make(map[float64]bool)

	for _, val := range input {
		if _, ok := m[val]; !ok {
			m[val] = true
			u = append(u, val)
		}
	}

	return u
}