// asFloat retuns the parameter as a float64
// or panics if it can't convert
323761
func asFloat(param string) (float64, error) {
	i, err := strconv.ParseFloat(param, 64)
	if err != nil {
		return 0.0, ErrBadParameter
	}
	return i, nil
}
777999
func (*GoFlags) Float64(o string, d float64, c string) *float64 {
	return flag.Float64(o, d, c)
}
1350079
func GetFloat(n ast.Node) (float64, error) {
	if node, ok := n.(*ast.BasicLit); ok && node.Kind == token.FLOAT {
		return strconv.ParseFloat(node.Value, 64)
	}
	return 0.0, fmt.Errorf("Unexpected AST node type: %T", n)
}
1256505
func (r *Encoder) EncodeFloat64(f float64) error {
	_, err := r.w.Write([]byte{CHR_FLOAT64})
	if err != nil {
		return err
	}
	return binary.Write(r.w, binary.BigEndian, f)
}
208395
func getFloat(unk interface{}) float64 {
	switch i := unk.(type) {
	case float64:
		return i
	case string:
		f, err := strconv.ParseFloat(i, 64)
		if err != nil || math.IsNaN(f) {
			return float64(0)
		}
		return f
	default:
		return float64(0)
	}
}
489663
func NewFloat64(val float64, p *float64) *Float64 {
	*p = val
	return (*Float64)(p)
}
715417
func ToFloat64(v Value) (float64, error) {
	num, err := newNumeric(v)
	if err != nil {
		return 0, err
	}
	switch num.typ {
	case Int64:
		return float64(num.ival), nil
	case Uint64:
		return float64(num.uval), nil
	case Float64:
		return num.fval, nil
	}
	panic("unreachable")
}
958564
func (c *Context) Float64(name string) float64 {
	return lookupFloat64(name, c.flagSet)
}
1203852
func ParamFloat64(r *http.Request, name string, defaultValue float64) float64 {
	value, err := strconv.ParseFloat(r.FormValue(name), 10)
	if err != nil {
		return defaultValue
	}
	return value
}
546463
func (dec *Decoder) Float64(v *float64) error {
	err := dec.decodeFloat64(v)
	if err != nil {
		return err
	}
	dec.called |= 1
	return nil
}
849055
func Float(v float64) *float64 {
	ptr := new(float64)
	*ptr = v
	return ptr
}
659311
func Float(v interface{}, err error) (float64, error) {
	if err != nil {
		return 0.0, err
	}

	vf, ok := v.(float64)
	if ok {
		return vf, nil
	}

	return 0.0, newWrongTypeError(v, vf)
}
1053033
func (p *Params) MustFloat64(key string, defaults ...float64) float64 {
	r, err := strconv.ParseFloat(p.Get(key), 64)
	if len(defaults) > 0 && err != nil {
		return defaults[0]
	}
	return r
}
414972
func NumberToFloat(n ast.Number) *big.Float {
	r, ok := new(big.Float).SetString(string(n))
	if !ok {
		panic("illegal value")
	}
	return r
}
6079
func Float(min, max float64) (float64, error) {
	return min + Rnd.Float64()*(max-min), nil
}
1107552
func Float(v float64) *float64 {
	p := new(float64)
	*p = v
	return p
}
755271
func DecodeFloat(b []byte) ([]byte, float64, error) {
	b, u, err := DecodeUint(b)
	return b, decodeCmpUintToFloat(u), errors.Trace(err)
}