// AppendFloat64 encodes and inserts a double precision float value into the dst byte array.
771019
func (Encoder) AppendFloat64(dst []byte, val float64) []byte {
	switch {
	case math.IsNaN(val):
		return append(dst, "\xfb\x7f\xf8\x00\x00\x00\x00\x00\x00"...)
	case math.IsInf(val, 1):
		return append(dst, "\xfb\x7f\xf0\x00\x00\x00\x00\x00\x00"...)
	case math.IsInf(val, -1):
		return append(dst, "\xfb\xff\xf0\x00\x00\x00\x00\x00\x00"...)
	}
	major := majorTypeSimpleAndFloat
	subType := additionalTypeFloat64
	n := math.Float64bits(val)
	dst = append(dst, byte(major|subType))
	for i := uint(1); i <= 8; i++ {
		b := byte(n >> ((8 - i) * 8))
		dst = append(dst, b)
	}
	return dst
}
777999
func (*GoFlags) Float64(o string, d float64, c string) *float64 {
	return flag.Float64(o, d, c)
}
1226259
func (d *Decoder) DecodeFloat64() (float64, error) {
	c, err := d.readCode()
	if err != nil {
		return 0, err
	}
	return d.float64(c)
}
1086563
func minFloat64(x float64, others ...float64) float64 {
	min := x
	for _, y := range others {
		if y < min {
			min = y
		}
	}
	return min
}
1076473
func Float64() float64 {
	mu.Lock()
	res := r.Float64()
	mu.Unlock()
	return res
}
1087356
func (w *ByteWriter) WriteFloat64(val float64, offset int) (int, error) {
	return w.WriteVal(val, offset)
}
240512
func appendFixed64(b []byte, v uint64) []byte {
	b = append(b,
		byte(v),
		byte(v>>8),
		byte(v>>16),
		byte(v>>24),
		byte(v>>32),
		byte(v>>40),
		byte(v>>48),
		byte(v>>56))
	return b
}
156497
func Float64(short string, long string, value float64, usage string) *float64 {
	flagVar := value
	return Float64Var(&flagVar, short, long, value, usage)
}
859550
func (d *MyDecimal) ToFloat64() (float64, error) {
	f, err := strconv.ParseFloat(d.String(), 64)
	if err != nil {
		err = ErrOverflow
	}
	return f, err
}
16948
func (c Context) Float64(key string, f float64) Context {
	c.l.context = enc.AppendFloat64(enc.AppendKey(c.l.context, key), f)
	return c
}
1283285
func (Encoder) AppendInt64(dst []byte, val int64) []byte {
	major := majorTypeUnsignedInt
	contentVal := val
	if val < 0 {
		major = majorTypeNegativeInt
		contentVal = -val - 1
	}
	if contentVal <= additionalMax {
		lb := byte(contentVal)
		dst = append(dst, byte(major|lb))
	} else {
		dst = appendCborTypePrefix(dst, major, uint64(contentVal))
	}
	return dst
}
1005842
func (Encoder) AppendFloat32(dst []byte, val float32) []byte {
	return appendFloat(dst, float64(val), 32)
}
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
}
1070578
func Float64s(data []float64) []float64 {
	sort.Float64s(data)
	n := Uniq(sort.Float64Slice(data))
	return data[:n]
}
453663
func (c *Config) Float64(key string) (float64, error) {
	return strconv.ParseFloat(c.get(key), 64)
}
886690
func (c Context) Floats64(key string, f []float64) Context {
	c.l.context = enc.AppendFloats64(enc.AppendKey(c.l.context, key), f)
	return c
}
1318913
func (enc *Encoder) encodeFloat(n float64) ([]byte, error) {
	enc.buf = strconv.AppendFloat(enc.buf, n, 'f', -1, 64)
	return enc.buf, nil
}