func (r SortedFloat64Set) Min() (k float64, ok bool) {
	if r.root == nil {
		return
	}
	h := r.min(r.root)
	return h.key, true
}
Min returns the smallest key in the sorted set, if it exists.
package codegen
func (r SortedFloat64Set) compare(a, b float64) int {
	const e = 0.00000001
    diff := (a-b)/a
    if diff < -e {
        return -1
    } else if diff > e {
        return 1
    }
    return 0
}
type SortedFloat64Set struct {
	root *nodeFloat64
}
func NewSortedFloat64Set() *SortedFloat64Set { return &SortedFloat64Set{} }
func (r SortedFloat64Set) IsEmpty() bool {
	return r.root == nil
}
func (r SortedFloat64Set) Size() int { return r.root.size() }
func (r *SortedFloat64Set) Clear() { r.root = nil }
func (r *SortedFloat64Set) Put(k float64) (already bool) {
	r.root, already = r.put(r.root, k)
	return
}
func (r *SortedFloat64Set) put(h *nodeFloat64, k float64) (_ *nodeFloat64, already bool) {
	if h == nil {
		n := &nodeFloat64{key: k, n: 1, colorRed: true}
		return n, already
	}
	cmp := r.compare(k, h.key)
	if cmp < 0 {
		h.left, already = r.put(h.left, k)
	} else if cmp > 0 {
		h.right, already = r.put(h.right, k)
	} else {
		already = true
	}
	if h.right.isRed() && !h.left.isRed() {
		h = r.rotateLeft(h)
	}
	if h.left.isRed() && h.left.left.isRed() {
		h = r.rotateRight(h)
	}
	if h.left.isRed() && h.right.isRed() {
		r.flipColors(h)
	}
	h.n = h.left.size() + h.right.size() + 1
	return h, already
}
func (r SortedFloat64Set) Contains(k float64) bool {
	return r.loopContains(r.root, k)
}
func (r SortedFloat64Set) loopContains(h *nodeFloat64, k float64) (ok bool) {
	for h != nil {
		cmp := r.compare(k, h.key)
		if cmp == 0 {
			return true
		} else if cmp < 0 {
			h = h.left
		} else if cmp > 0 {
			h = h.right
		}
	}
	return
}