func WriteFloat64(space []byte, val float64) []byte {
	abs := math.Abs(val)
	fmt := byte('f')
	if abs != 0 {
		if abs < 1e-6 || abs >= 1e21 {
			fmt = 'e'
		}
	}
	return append(space, strconv.FormatFloat(float64(val), fmt, -1, 64)...)
}
WriteFloat64 write float64 to stream
package jsonfmt
import (
	"unsafe"
	"math"
	"strconv"
	"context"
)
var pow10 []uint64
func init() {
	pow10 = []uint64{1, 10, 100, 1000, 10000, 100000, 1000000}
}
type lossyFloat64Encoder struct {
}
func (encoder *lossyFloat64Encoder) Encode(ctx context.Context, space []byte, ptr unsafe.Pointer) []byte {
	return WriteFloat64Lossy(space, *(*float64)(ptr))
}
type lossyFloat32Encoder struct {
}
func (encoder *lossyFloat32Encoder) Encode(ctx context.Context, space []byte, ptr unsafe.Pointer) []byte {
	return WriteFloat32Lossy(space, *(*float32)(ptr))
}