// NewFloat creates a new Float
490575
func NewFloat(f float64, valid bool) Float {
	return Float{
		NullFloat64: sql.NullFloat64{
			Float64: f,
			Valid:   valid,
		},
	}
}
1187312
func Float64(v float64) *float64 {
	p := new(float64)
	*p = v
	return p
}
170007
func NewConstFloat(r string) (*ConstNumber, bool) {
	z := new(ConstNumber)
	z.Type = ConstFloat
	_, ok := z.Value.Re.SetString(r)
	return z, ok
}
69071
func NewPointFlat(l Layout, flatCoords []float64) *Point {
	g := new(Point)
	g.layout = l
	g.stride = l.Stride()
	g.flatCoords = flatCoords
	return g
}
157560
func AppendFloat(dst EncodingBuffer, val float64, fmt byte, prec, bitSize int) {
	var bits uint64
	var flt *floatInfo
	switch bitSize {
	case 32:
		bits = uint64(math.Float32bits(float32(val)))
		flt = &float32info
	case 64:
		bits = math.Float64bits(val)
		flt = &float64info
	default:
		panic("strconv: illegal AppendFloat/FormatFloat bitSize")
	}

	neg := bits>>(flt.expbits+flt.mantbits) != 0
	exp := int(bits>>flt.mantbits) & (1<<flt.expbits - 1)
	mant := bits & (uint64(1)<<flt.mantbits - 1)

	switch exp {
	case 1<<flt.expbits - 1:
		// Inf, NaN
		var s string
		switch {
		case mant != 0:
			s = "NaN"
		case neg:
			s = "-Inf"
		default:
			s = "+Inf"
		}
		dst.WriteString(s)
		return

	case 0:
		// denormalized
		exp++

	default:
		// add implicit top bit
		mant |= uint64(1) << flt.mantbits
	}
	exp += flt.bias

	// Pick off easy binary format.
	if fmt == 'b' {
		fmtB(dst, neg, mant, exp, flt)
		return
	}

	if !optimize {
		bigFtoa(dst, prec, fmt, neg, mant, exp, flt)
		return
	}

	var digs decimalSlice
	ok := false
	// Negative precision means "only as much as needed to be exact."
	shortest := prec < 0
	if shortest {
		// Try Grisu3 algorithm.
		f := new(extFloat)
		lower, upper := f.AssignComputeBounds(mant, exp, neg, flt)
		var buf [32]byte
		digs.d = buf[:]
		ok = f.ShortestDecimal(&digs, &lower, &upper)
		if !ok {
			bigFtoa(dst, prec, fmt, neg, mant, exp, flt)
			return
		}
		// Precision for shortest representation mode.
		switch fmt {
		case 'e', 'E':
			prec = max(digs.nd-1, 0)
		case 'f':
			prec = max(digs.nd-digs.dp, 0)
		case 'g', 'G':
			prec = digs.nd
		}
	} else if fmt != 'f' {
		// Fixed number of digits.
		digits := prec
		switch fmt {
		case 'e', 'E':
			digits++
		case 'g', 'G':
			if prec == 0 {
				prec = 1
			}
			digits = prec
		}
		if digits <= 15 {
			// try fast algorithm when the number of digits is reasonable.
			var buf [24]byte
			digs.d = buf[:]
			f := extFloat{mant, exp - int(flt.mantbits), neg}
			ok = f.FixedDecimal(&digs, digits)
		}
	}
	if !ok {
		bigFtoa(dst, prec, fmt, neg, mant, exp, flt)
		return
	}
	formatDigits(dst, shortest, neg, digs, prec, fmt)
	return
}
700515
func NewFloatSimple(f float64) FloatAttribute {
	result := &FloatSimple{
		NewAttribute(NORMAL, nil, nil),
	}
	result.Set(f)
	return result
}
1273046
func (v *Value) bytesToFloat() (float64, bool) {
	bytes, _ := v.ToBytes()
	i, err := strconv.ParseFloat(string(bytes), 64)
	return i, err == nil
}
790146
func (r *Rational) ToFloat64() float64 {
	return float64(r.num) / float64(r.den)
}
378764
func (j *JsonQuery) Float(s ...string) (float64, error) {
	val, err := rquery(j.blob, s...)
	if err != nil {
		return 0.0, err
	}
	return floatFromInterface(val)
}
707386
func toFloat(v reflect.Value) (float64, error) {
	switch v.Kind() {
	case reflect.Float32, reflect.Float64:
		return v.Float(), nil
	case reflect.Interface:
		return toFloat(v.Elem())
	}
	return -1, errors.New("unable to convert value to float")
}
55972
func NewFloatTypeParserToVar(variable *float64) *FloatTypeParser {
	parser := new(FloatTypeParser)
	parser.setter = func(value float64) {
		*variable = value
	}
	return parser
}
176309
func (ini *INI) SetFloat(key string, value float64) {
    ini.SectionSetFloat(DefaultSection, key, value)
}
489663
func NewFloat64(val float64, p *float64) *Float64 {
	*p = val
	return (*Float64)(p)
}
579244
func AsFloat(d DataType) (float64, bool) {
	value, ok := d.Value().(float64)
	return value, ok
}
617895
func (s *StreamEncoder) AddFloat64(value float64) {
	s.buf = strconv.AppendFloat(s.buf, value, 'f', -1, 64)
	s.Encoder.writeByte(s.delimiter)
}
840059
func SetDefaultFloat(in float64) floatRuleOpt {
	return func(i *rpc.FloatRule) {
		i.Default = in
		i.HasDefault = true
	}
}
327520
func (bd *BinaryDecoder) ReadFloat() (float32, error) {
	var float float32
	if err := checkEOF(bd.buf, bd.pos, 4); err != nil {
		return float, err
	}
	bits := binary.LittleEndian.Uint32(bd.buf[bd.pos : bd.pos+4])
	float = math.Float32frombits(bits)
	bd.pos += 4
	return float, nil
}