// FilterFloat64 iterates over a collection of float64, returning an array of
// all float64 elements predicate returns truthy for.
435278
func FilterFloat64(s []float64, cb func(s float64) bool) []float64 {
	results := []float64{}

	for _, i := range s {
		result := cb(i)

		if result {
			results = append(results, i)
		}
	}

	return results
}
300462
func (r *Reader) ReadFloat64() float64 {
	tag := r.readByte()
	decoder := float64Decoders[tag]
	if decoder == nil {
		castError(tag, "float64")
	}
	return decoder(r)
}
372593
func (d *defaulter) AsFloat64(v Valuer, dv float64) float64 {
	value, err := v.Value()
	if err != nil {
		d.logValuerError(err)
		return dv
	}
	fvalue, err := strconv.ParseFloat(value, 64)
	if err != nil {
		d.logFormatError("float64", err)
		return dv
	}
	return fvalue
}
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
	}
}
1185356
func maxFloat64(x float64, others ...float64) float64 {
	max := x
	for _, y := range others {
		if y > max {
			max = y
		}
	}
	return max
}
565617
func (l *Literal) Float64() (float64, error) {
	if l.t != Float64 {
		return 0, fmt.Errorf("literal.Float64: literal is of type %v; cannot be converted to a float64", l.t)
	}
	return l.v.(float64), nil
}
997787
func NewFloat64s(less func(x, y float64) bool, cap int) *Float64s {
	h := &Float64s{}

	if less != nil {
		h.less = func(i, j int) bool {
			return less(h.list[i], h.list[j])
		}
	}
	if cap > 0 {
		h.list = make([]float64, 0, cap)
	}

	return h
}
1076473
func Float64() float64 {
	mu.Lock()
	res := r.Float64()
	mu.Unlock()
	return res
}
981706
func ToFloat64(val interface{}) (float64, error) {
	switch v := val.(type) {
	case int:
		return float64(v), nil
	case int8:
		return float64(v), nil
	case int16:
		return float64(v), nil
	case int32:
		return float64(v), nil
	case int64:
		return float64(v), nil
	case float32:
		return float64(v), nil
	case float64:
		return v, nil
	case string:
		return strconv.ParseFloat(v, 64)
	case json.Number:
		return v.Float64()
	default:
		return 0, fmt.Errorf("Unhandled type: %t", v)
	}
}
840944
func FindFloat64(s []float64, cb func(s float64) bool) (float64, bool) {
	for _, i := range s {
		result := cb(i)

		if result {
			return i, true
		}
	}

	return 0.0, false
}
614239
func _float64(i interface{}) (float64, bool) {

	switch v := i.(type) {

	case float32:
		return float64(v), true
	case float64:
		return v, true
	}

	return 0, false
}
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)
}
1055566
func (p *parserMixin) Float64List() (target *[]float64) {
	target = new([]float64)
	p.Float64ListVar(target)
	return
}
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
		}
	}
}
487486
func QueryGetFloat64(request *http.Request, key string) (float64, error) {
	return ParseFloat64(QueryGet(request, key))
}
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
}
975623
func NewFloats64(into *[]float64, v []float64) *Floats64Value {
	*into = v
	return (*Floats64Value)(into)
}