// NewFloat64 returns a new float64 value
489663
func NewFloat64(val float64, p *float64) *Float64 {
	*p = val
	return (*Float64)(p)
}
859685
func (d *MyDecimal) FromFloat64(f float64) error {
	s := strconv.FormatFloat(f, 'g', -1, 64)
	return d.FromString([]byte(s))
}
1373404
func NewFloatEncoder() *FloatEncoder {
	s := FloatEncoder{
		first:   true,
		leading: ^uint64(0),
	}

	s.bw = bitstream.NewWriter(&s.buf)
	s.buf.WriteByte(floatCompressedGorilla << 4)

	return &s
}
1185356
func maxFloat64(x float64, others ...float64) float64 {
	max := x
	for _, y := range others {
		if y > max {
			max = y
		}
	}
	return max
}
143211
func (v Value) Float64() (float64, error) {
	f, err := strconv.ParseFloat(v.String(), 64)
	if err != nil {
		return 0.0, v.invalidTypeError(err, "float64")
	}
	return f, nil
}
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
}
1364893
func UniqFloat64(a []float64) []float64 {
	length := len(a)

	seen := make(map[float64]struct{}, length)
	j := 0

	for i := 0; i < length; i++ {
		v := a[i]

		if _, ok := seen[v]; ok {
			continue
		}

		seen[v] = struct{}{}
		a[j] = v
		j++
	}

	return a[0:j]
}
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
}
1037654
func (p *Partial) Float64() (f float64, err error) {
	err = p.Unmarshal(&f)
	return
}
631540
func SumFloat64(s []float64) (sum float64) {
	for _, v := range s {
		sum += v
	}
	return
}
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)
}
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
}
722505
func (p *Params) Float64(key string) (float64, error) {
	return strconv.ParseFloat(p.Get(key), 64)
}
1255494
func Float64() gopter.Gen {
	return gopter.CombineGens(
		Int64Range(0, 1),
		Int64Range(0, 0x7fe),
		Int64Range(0, 0xfffffffffffff),
	).Map(func(values []interface{}) float64 {
		sign := uint64(values[0].(int64))
		exponent := uint64(values[1].(int64))
		mantissa := uint64(values[2].(int64))

		return math.Float64frombits((sign << 63) | (exponent << 52) | mantissa)
	}).WithShrinker(Float64Shrinker)
}
639429
func (enc *Encoder) WriteFloat64(n float64) error {
	bits := math.Float64bits(n)
	enc.err = enc.buf.WriteByte(byte(bits >> 56))
	if enc.err == nil {
		enc.err = enc.buf.WriteByte(byte(bits >> 48))
		if enc.err == nil {
			enc.err = enc.buf.WriteByte(byte(bits >> 40))
			if enc.err == nil {
				enc.err = enc.buf.WriteByte(byte(bits >> 32))
				if enc.err == nil {
					enc.err = enc.buf.WriteByte(byte(bits >> 24))
					if enc.err == nil {
						enc.err = enc.buf.WriteByte(byte(bits >> 16))
						if enc.err == nil {
							enc.err = enc.buf.WriteByte(byte(bits >> 8))
							if enc.err == nil {
								enc.err = enc.buf.WriteByte(byte(bits))
							}
						}
					}
				}
			}
		}
	}
	return enc.err
}
1019898
func NewFloatResult(val float64, err error) *FloatCmd {
	var cmd FloatCmd
	cmd.val = val
	cmd.setErr(err)
	return &cmd
}
777999
func (*GoFlags) Float64(o string, d float64, c string) *float64 {
	return flag.Float64(o, d, c)
}