// gt evaluates the comparison a > b.
345840
func gt(arg1, arg2 interface{}) (bool, error) {
	// > is the inverse of <=.
	lessOrEqual, err := le(arg1, arg2)
	if err != nil {
		return false, err
	}
	return !lessOrEqual, nil
}
265188
func (cfg *Config) Compare(a, b interface{}) string {
	diffCfg := *cfg
	diffCfg.Diffable = true
	return diff.Diff(cfg.Sprint(a), cfg.Sprint(b))
}
1003985
func (gt Gt) Or(conds ...Cond) Cond {
	return Or(gt, Or(conds...))
}
915924
func Gt(left, right interface{}) Condition {
	return Condition{
		Type:  ConditionGt,
		Left:  NewOperand(left),
		Right: NewOperand(right),
	}
}
552224
func (i *i) Equal(a, b interface{}) {
	if !areEqual(a, b) {
		i.Logf("%v != %v", a, b)
	}
}
550226
func nearlyEqual(a, b float64) bool {
	epsilon := 0.000001

	if a == b {
		return true
	}

	diff := math.Abs(a - b)

	if a == 0.0 || b == 0.0 || diff < math.SmallestNonzeroFloat64 {
		return diff < (epsilon * math.SmallestNonzeroFloat64)
	}

	absA := math.Abs(a)
	absB := math.Abs(b)

	return diff/math.Min(absA+absB, math.MaxFloat64) < epsilon
}
665247
func (gtidSet MariadbGTIDSet) Equal(other GTIDSet) bool {
	mdbOther, ok := other.(MariadbGTIDSet)
	if !ok {
		return false
	}
	if len(gtidSet) != len(mdbOther) {
		return false
	}
	for i, gtid := range gtidSet {
		if gtid != mdbOther[i] {
			return false
		}
	}
	return true
}
1092163
func (pg *GoEvtxMap) Equal(path *GoEvtxPath, i interface{}) bool {
	t, err := pg.Get(path)
	if err != nil {
		return false
	}
	return reflect.DeepEqual(*t, i)
}
286244
func Equals(a interface{}, b interface{}) BoolPredicate {
	return func() bool {
		switch aval := a.(type) {
		case string:
			bval, ok := b.(string)
			return ok && aval == bval
		case []string:
			bval, ok := b.([]string)
			if !ok {
				return false
			}
			if len(aval) != len(bval) {
				return false
			}
			for i := range aval {
				if aval[i] != bval[i] {
					return false
				}
			}
			return true
		default:
			return false
		}
	}
}
899899
func (r *Ruler) inequality(op int, actual, expected interface{}) bool {
	// need some variables for these deals
	ruleDebug("entered inequality comparison")
	var cmpStr [2]string
	var cmpUint [2]uint64
	var cmpInt [2]int64
	var cmpFloat [2]float64

	for idx, i := range []interface{}{actual, expected} {
		switch t := i.(type) {
		case uint8:
			cmpUint[idx] = uint64(t)
		case uint16:
			cmpUint[idx] = uint64(t)
		case uint32:
			cmpUint[idx] = uint64(t)
		case uint64:
			cmpUint[idx] = t
		case uint:
			cmpUint[idx] = uint64(t)
		case int8:
			cmpInt[idx] = int64(t)
		case int16:
			cmpInt[idx] = int64(t)
		case int32:
			cmpInt[idx] = int64(t)
		case int64:
			cmpInt[idx] = t
		case int:
			cmpInt[idx] = int64(t)
		case float32:
			cmpFloat[idx] = float64(t)
		case float64:
			cmpFloat[idx] = t
		case string:
			cmpStr[idx] = t
		default:
			ruleDebug("invalid type for inequality comparison")
			return false
		}
	}

	// whichever of these works, we're happy with
	// but if you're trying to compare a string to an int, oh well!
	switch op {
	case gt:
		return cmpStr[0] > cmpStr[1] ||
			cmpUint[0] > cmpUint[1] ||
			cmpInt[0] > cmpInt[1] ||
			cmpFloat[0] > cmpFloat[1]
	case gte:
		return cmpStr[0] >= cmpStr[1] ||
			cmpUint[0] >= cmpUint[1] ||
			cmpInt[0] >= cmpInt[1] ||
			cmpFloat[0] >= cmpFloat[1]
	case lt:
		return cmpStr[0] < cmpStr[1] ||
			cmpUint[0] < cmpUint[1] ||
			cmpInt[0] < cmpInt[1] ||
			cmpFloat[0] < cmpFloat[1]
	case lte:
		return cmpStr[0] <= cmpStr[1] ||
			cmpUint[0] <= cmpUint[1] ||
			cmpInt[0] <= cmpInt[1] ||
			cmpFloat[0] <= cmpFloat[1]
	}

	return false
}
1269086
func AnalyticsTagsEqual(o1, o2 *AnalyticsTagsOption) bool {
	if o1 != nil {
		return o1.Equal(o2)
	}
	if o2 != nil {
		return o2.Equal(o1)
	}
	return true
}
539241
func (dt *DateTime) Gt(value time.Time) *DateTime {
	if !dt.value.After(value) {
		dt.chain.fail("\nexpected datetime > then:\n %s\n\nbut got:\n %s",
			value, dt.value)
	}
	return dt
}
293160
func Pair(g1 *G1, g2 *G2) *GT {
	return &GT{optimalAte(g2.p, g1.p, new(bnPool))}
}
285731
func (t *Tags) Compare(tr *Tags) int {
	tags := *t
	count := 0
	for _, tag := range tags {
		if tr.Exist(tag) {
			count++
		}
	}
	return count
}
993662
func (b BinaryLiteral) Compare(b2 BinaryLiteral) int {
	bufB := trimLeadingZeroBytes(b)
	bufB2 := trimLeadingZeroBytes(b2)
	if len(bufB) > len(bufB2) {
		return 1
	}
	if len(bufB) < len(bufB2) {
		return -1
	}
	return bytes.Compare(bufB, bufB2)
}
28905
func Gt(column string) Cmp {
	return Cmp{
		op:     gt,
		column: column,
		value:  param(column),
	}
}
765708
func (b Blob) Equal(other Argument) bool {
	if other.Typetag() != TypetagBlob {
		return false
	}
	b2 := other.(Blob)
	if len(b) != len(b2) {
		return false
	}
	return bytes.Equal(b, b2)
}