INNER CODE UNIT · Go
cmp
ericlagergren/decimal · big.go:450
func cmp(x, y *Big, abs bool) int {
if x == y {
return 0
}
// NaN cmp x
// z cmp NaN
// NaN cmp NaN
if (x.form|y.form)&nan != 0 {
return 0
}
// Fast path: Catches non-finite forms like zero and ±Inf,
// possibly signed.
xs := x.ord(abs)
ys := y.ord(abs)
if xs != ys {
if xs > ys {