//Float cast input to int64
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
}
772508
func float64ToInt(input float64) (output int) {
	r, _ := Round(input, 0)
	return int(r)
}
572252
func toFloat64(v reflect.Value) float64 {
	f, _ := tryToFloat64(v)
	return f
}
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
}
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
}
1198486
func (p *parserMixin) Float64() (target *float64) {
	target = new(float64)
	p.Float64Var(target)
	return
}
1044210
func ToFloat(data interface{}) (float64, bool) {
	switch typed := data.(type) {
	case float64:
		return typed, true
	case float32:
		return float64(typed), true
	default:
		if n, ok := ToInt(data); ok {
			return float64(n), true
		}
		return 0, false
	}
}
53726
func (a *Array) Float64(f float64) *Array {
	a.buf = enc.AppendFloat64(enc.AppendArrayDelim(a.buf), f)
	return a
}
1360636
func (num Number) Float64() (float64, bool) {
	f, err := json.Number(num).Float64()
	if err != nil {
		return 0, false
	}
	return f, true
}
22765
func (v *Value) Float() float64 {
	switch v.getResolvedValue().Kind() {
	case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:
		return float64(v.getResolvedValue().Int())
	case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64:
		return float64(v.getResolvedValue().Uint())
	case reflect.Float32, reflect.Float64:
		return v.getResolvedValue().Float()
	case reflect.String:
		// Try to convert from string to float64 (base 10)
		f, err := strconv.ParseFloat(v.getResolvedValue().String(), 64)
		if err != nil {
			return 0.0
		}
		return f
	default:
		logf("Value.Float() not available for type: %s\n", v.getResolvedValue().Kind().String())
		return 0.0
	}
}
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
}
522559
func toFloat64(v interface{}) float64 {
	if str, ok := v.(string); ok {
		iv, err := strconv.ParseFloat(str, 64)
		if err != nil {
			return 0
		}
		return iv
	}

	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() == true {
			return 1
		}
		return 0
	default:
		return 0
	}
}
991559
func (h Hash) Float64(key string) (float64, error) {
	if value, ok := h[key]; ok {
		return value.Float64()
	}
	return 0.0, errors.New(ErrInvalidKey, errorMessages, key)
}
473355
func Float64(name string, value float64, usage string) *float64 {
	return CommandLine.Float64(name, value, usage)
}
389781
func Float(key string, def float64, bit int) float64 {
	val := os.Getenv(key)
	if val == "" {
		return def
	}

	f, err := strconv.ParseFloat(val, bit)
	if err != nil {
		return def
	}
	return f
}
1303773
func (v *variable) floatValue() float64 {
	f, err := strconv.ParseFloat(v.value, 64)
	if err != nil {
		panic("unexpected value " + v.value + " for float ")
	}
	return f
}
1106545
func Float32(val string) (float32, error) {
	f, err := strconv.ParseFloat(val, 32)
	if err != nil {
		return 0, err
	}
	return float32(f), nil
}